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:

Content

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.
    1. To select the item you want to display, click Select <item name> button.
      A list of all items appears.
    2. 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.

List Settings

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:
  • Auto-generated page
    When an item is clicked, it is displayed in a page which is automatically generated and has the same layout as the current page.
  • Select existing page…
    You select a page from the existing pages with certain layout where an item will be displayed when clicked.

    NOTE: In order to display the custom item, the page you have selected must have your custom widget added.

    1. Click Select Page.
      From the treeview, select the page where you want to display the item.
    2. Click Done selecting.
  • In Detail templates, 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.
  • If you want to display buttons for social sharing, select Enable social share buttons.
    This enables your users to share the items, for example, on Facebook.
    To configure which buttons to display, see Social sharing.

Filtering and sorting the items

You can filter and sort the custom items, which the widget displays, using fields of the item.
  1. To filter or sort the items, click Advanced button in the lower-right corner of the window.
    The advanced editing mode opens.
  2. 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.

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK