IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
To edit a widget template, perform the following:
Some of these templates by default use our Kendo controls (all Kendo UI is included in the Sitefinity CMS distribution), so you can customize them using the options, methods, and events from the Kendo API. For more information, see https://docs.telerik.com/kendo-ui/api/web/menu and https://docs.telerik.com/kendo-ui/api/web/treeview.
For example, the Tree (vertical with sub-pages) template uses the Kendo TreeView control and the Horizontal with dropdown menus template uses the Kendo Menu control.
Following is an example of how to customize the template, so that the navigation nodes expand on the initial loading.
Using the <script> tag
You do this with a <script> tag directly in the template.
<script>
When you publish the page, the tree is rendered in collapsed state.
Using external JavaScript file
You can achieve the same functionality by moving the above mentioned customization in external JavaScript file. We recommend using this approach, because this way the browser caches the external scripts.
The following example shows how to customize the navigation to collapse all nodes, except the currently open one.
Follow this example, if you want to have a navigation that is displaying in an accordion style provided by the Kendo PanelBar. For more information, see https://docs.telerik.com/kendo-ui/api/web/panelbar.
Follow this procedure, if you want to modify the default behavior of the menu template in order to open the parent pages on click and expand the menu on hover.
Perform the following:
var whetherToOpenOnClick = true;
Follow this procedure, if you want to use RadControls with the Navigation widget. This example uses RadMenu instead of the kendoMenu.
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