-
Notifications
You must be signed in to change notification settings - Fork 79
Navigation widget templates explained
ElenaGaneva edited this page May 31, 2014
·
1 revision
In the templates of the Navigation widget we provide couple of helpers that are responsible for rendering and styling of the pages inside the navigation and the CSS classes that are applied to them. This way you can modify only the html helper responsible for the particular html output, in case you want to change the styles of the selected node, or the rendering of any of the widget levels.
In the template you can take advantage of the data that we store in the widget model. The templates of Navigation widget has access to the following properties:
- Nodes – contains information about all of the page nodes that will be rendered inside the Navigation widget. This collection is restricted to the level and selection mode that are specified through the widget designer. Every element from the collection contains information about Page Title, URL, Link target and so on.
- CssClass – classes applied for the whole widget
- CurrentSiteMapNode – contains current SiteMapNode instance.
- RenderRootLevelNode – specify how to render the root level nodes of the Navigation widget
- RenderSubLevelsRecursive – specify how to render the sub levels of the Navigation widget
- GetClass – this helper method is used to specify the CSS class that will be applied to the
- elements that wrap the page navigation links. By default it applies the same style named “active” to the selected page and to all of its parent pages (if such are presented).