Create the Festivals page

This page displays all festivals in all countries and gives users the ability to filter them by specific country. 

The following screenshot shows the display of Festivals widget:

travelling agency14

Configure Festivals widget 

By default, the Festivals widget display a list of all festivals in all countries.
To filter the display, perform the following:

  1. Configure the widget to display festivals From the currently open country.
    This means that when country item is resolved in the URL, the Festivals widget will filter its items by this country.
  2. Show all items, if parent filter is not resolved.
    By default, when filtering by parent item is enabled and parent item is not resolved in the URL the widget does not show any items. 
    If you want all festivals to be displayed when there is no parent filter, open the Advanced settings of the Festivals widget and set the ShowListViewOnEmpyParentFilter property of the widget to true
  3. Go to List settings of the Festivals widget and set the My vacation - List of festivals- With Thumbnail template.

The following screenshot shows the display of Festivals widget:

travelling agency15

Configure the Countries widget for filtering

When you have a hierarchy of dynamic module types, you can create a list of parent items and use them to create filtering for child items.

To filter festival items by country, you have to drop a Countries widget that is used for the filters. Perform the following:

  1. Go to Advanced settings and set the display mode of the widget to be always list, by setting the ContentViewDisplayMode property of the widget to Master.
  2. To display the country, by which the list of festivals is filtered, as selected, set the SelectCurrentItem property of the widget to true
    Since the widget marks the current item as selected, you must apply a SelectedItemTemplate to the list view template, so that the selected item looks different from the others.
  3. Go to List settings of the Countries widget and set the My vacation - List of countries - Filter template. 

The following screenshot shows the display of Festivals widget by selected parent USA: 

travelling agency16

Was this article helpful?