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.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important