The Categories widget by default has just one view that shows all available categories as a flat list.
This tutorial demonstrates how to create a view that displays a tree, which preserves the hierarchy of the categories. For example:
You first configure the Categories widget and then add and implement the new categories view.
NOTE: After setting this option to False, the widget will start performing additional calls to the database for each taxon, so that it retrieves its children. For a very large taxonomy, this may decrease the performance of the widget.
The view model contains a Taxa collection of objects of type Telerik.Sitefinity.Frontend.Taxonomies.Mvc.Models.TaxonViewModel. Such objects contain a SubTaxa collection that contains the child taxa.
The CSS code formats the tree and applies styles to the expand buttons and the sublists of categories. You can insert this code in the view's file, using a <style> tag.
Use the following example for the code of the view:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2022 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity