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/

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Tags

Was this article helpful?