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.
- Create a page named Countries and drop the Countries MVC widget on it.
- Open the widget designer and click Advanced » Model.
ListMode property, enter true.
- 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.
- To highlight the filtered dynamic content items, add the following code in the template:
Save the template.
- Open the Countries page in the frontend and add a country in the URL in the following way: