Creating a custom module
In Freedom, you can build custom modules for the end-user that can collect and display data in nearly limitless ways. You can determine what information is collected in the Blue Interface, and determine how that information displays on the live site with full control over the HTML. Custom modules are also used to build directories of products that can work with the Commerce Module, allowing you to sell products online.
Creating a custom module
- Go to the Toolbar Module of the Green Interface.
- Click the Add a new Custom Module button.
- Select a template from the list.
- In the Unique ID field, enter a name for the module, which will be used internally by the system.
- In the Toolbar Title field, give the module a name. This name will appear in the Blue Interface.
- If you want the module to appear in the Blue Interface, set the Blue option to "On."
- Click the Add new Custom Module button. The new module will be created.
Setting up the new custom module
- In the Toolbar module, the new module should now appear in the list of modules. Click Edit next to its name.
- A screen will appear that has four subtabs: Configuration, Fields, Lookups and Categories. On the Configuration tab you can control the module's settings. To make the custom directory a product catalog that works with Commerce, check the Enable E-commerce option. Once you've finished with the configuration settings, click Apply.
- Switch to the Fields subtab. This is where you can add fields to the directory which collect data in Blue. Depending on what template you selected when creating the directory, certain fields will already appear here.
- To add a new field, click the Add a new Field button. A popup window will appear with a list of options for the new field.
- Select a Field Type. Index fields are used for setting up tags, which make them easier for users to locate. For normal fields that don't require this functionality, it's recommended that you use predefined rather than custom fields, because you can:
a. Use them to set up searches
b. Display them as columns in Blue
c. Sort or filter module layouts by them
- However, if your custom module will have more than ten fields, you may have to use custom fields for those fields that won't be used for searching, sorting or filtering.
- For Unique ID, select an option from the list (in the case of Predefined or Index fields) or enter one (in the case of Custom fields). The unique ID is how the field will be referenced within the system.
- For Label, enter a title for the field that will appear in the Blue Interface.
- For Input Type, determine how Blue users will enter information into the field. The options below Input Type will change, depending on which type you selected.
- The Blue HTML field determines how the field will appear in the Blue Interface. The default option is [[input_row]], which displays the label and field as two columns in a table row. If you replace the default, make sure to enter a two-column table row.
- The White HTML field is similar to the field above, but it determines how the field displays when members add directory items from MyAccount. This functionality is set up using using the Membership Module.
- If you'd like for the field to have a small question mark next to it that users can click for information, enter text into the Help Text field. This can explain the purpose of the field to Blue users.
- Click OK. The new field will be created.
- Add additional fields as needed. To test the new module, view it in the Blue Interface.
Setting up module layouts
Module layouts let you control exactly how information from the directory will display on the live website. Information from each field can be displayed however you want by using tags from the Insert a tag icon in the toolbar. Each field added to the directory will appear in this list. For a basic understanding of how module layouts work, see Introduction to module layouts.