Configuring custom content widgets
If you have created and activated a custom module, the system automatically creates a widget and displays the widget in the content widget group. You use the widget to select which of your custom content to display on the website and to choose how to display the content.
PREREQUISITES: You have created at least one custom content item. For more information, see Using your custom modules.
After you have dragged the widget on your page, the widget automatically displays all published custom items.
To configure the display of the items, perform the following:
Click Edit button in the upper-right corner of the widget.
The Edit window appears where you can configure the following:
In content, you can choose which custom items of all the created items you want to display.
NOTE: If you are using multiple site management and the custom module uses data sources from more than one site, you must first choose the source from which you want to display items.
For more information, see Multiple site management.
In Which <item name> to display? radio button select one of the following:
- All published <item name>
All created items are displayed.
- One particular <item name> only…
The system displays one item.
- To select the item you want to display, click Select <item name> button.
A list of all items appears.
- Select the item and click Done selecting.
- Selection of <item name>:
You can narrow the displayed items, using categories, tags, and dates.
Select one or more of the following:
- by Categories…
Click the Select button to select the categories from which you want to display items and click Done.
- by Tags…
Click Select button to select the tags, so that items tagged with those particular tags will be displayed and click Done.
- by Dates…
Click Select button.
Select one of the predefined time intervals, so that items created during that interval will be displayed or choose Custom range… and use the From and To input fields to select a time interval. When finished click Done.
On this tab you choose how to display the item(s) you have selected.
- If you select Use paging radio button, the system divides the items into pages.
In the input field you specify how many items per page you want to display.
- If you select Use limit radio button, the system displays only a limited number of the items you have chosen to display.
In the input field, you specify how many items you want to display.
- If you select No limit and paging radio button, the system displays all the items that you have selected in Content tab.
- In Sort <item name> dropdown box, select a sorting criterion for the items.
- In List template, select the template which is used to display the items on the webpage.
You can create a custom template by clicking Create new template. You can edit existing templates by selecting them and clicking Edit.
For more information, see Creating and editing widget templates.
Single Item Settings
On this tab you choose the way to display the items.
In Open Single item in… radio button, select one of the following:
Filtering and sorting the items
You can filter and sort the custom items, which the widget displays, using fields of the item.
To filter or sort the items, click Advanced button in the lower-right corner of the window.
The advanced editing mode opens.
Click ControlDefinition » Views » DynamicContentMasterView buttons.
To filter the items, in FilterExpression input field, enter the desired filtering expression.
The field supports AND and OR Boolean operators.
For example, enter Visible = true AND Status = Live
For more information, see Filter expressions for content items.
To sort the items, in SortExpression input field, enter the desired sorting expression.
The field supports operators ASC for ascending and DESC for descending.
For example, enter PublicationDate DESC
NOTE: If on one page, you want to have more than one custom module widget, either from the same module, or from different custom modules, you must tell the system how to distinguish them by setting the UrlKeyPrefix.
To do this click Advanced button, in the lower-right corner of each of the custom widgets. In UrlKeyPrefix field, enter a prefix of your choice. For example, if the widgets are from two different modules, you can enter the name of the module.
For more information about advanced configuration options, see Advanced configuration of widgets.
When you are finished with all the settings, click Save.
The Edit window closes and the widget is configured to display the custom items you have selected.
NOTE: If your site is multilingual and the page you are editing is synchronized with another translation, when you edit the widget, the Save to all translations button appears. If you click it, the current widget configuration will be saved to all translations, else, if you click Save, the widget configuration is saves only to the current translation, but the pages are still synchronized. If your pages are synchronized, you can have different widget configurations, but you cannot have different widgets.