Highlight filtered items

By default, when you filter the dynamic content items by URL, the list is showing only items that satisfy the filter condition. In some cases you may want to show the whole list of items, but to highlight only the ones that satisfy the filter conditions. The following tutorial describe how to accomplish this scenario.

  1. Create a page named Countries and drop the Countries MVC widget on it.
  2. Open the widget designer and click Advanced » Model.
  3. In ListMode property, enter true.
  4. Navigate to Design » Widget Templates and find the template that is used by the widget in List view mode.
    For example, the list view template for the Countries MVC control is List.Country.
  5. To highlight the filtered dynamic content items, add the following code in the template:
  6. Save the template.
  7. Open the Countries page in the frontend and add a country in the URL in the following way:
    http://domain:XXX/countries/bulgaria/

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?