Customize the page result from filtering
I added a custom classification and using the Tags widget, I can use the widget to filter the blog posts by the custom classification. What I would like to know is how can I customize the page result so I can display the custom classification that is selected as a filter on top of the page? This will be useful so the user knows what the blog is filtered without having to look at the URL.
Thanks,
Johan
Any ideas on this? I am interested to find out how Sitefinity does the filtering, so I can customize the page result.
Hi Johan,
You have several options to show what tag or classification has been selected to filter the items.
1. The easiest way is to insert a javascript to the page and on document ready with jQuery to evaluate the url and get the selected tag ( .../selectedTag) and set to an element.
2. Another option is to bind the control template. This could be done from the Widget -> Edit -> Advanced -> LayoutTemplatePath and in the codebehind of the .ascx in PageLoad to check if it is a postback and to evaluate the Url and set the value to a ASP label or other control.
3. You can make a custom widget, which inherits from the default one - TaxonomyControl and add you own custom logic.
These are only a suggestions. Feel free to choose the way you achieve your desired scenario.
Regards,
Nikola Zagorchev
Telerik