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

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?