User Control For Navigation

Posted by Community Admin on 03-Aug-2018 09:04

User Control For Navigation

All Replies

Posted by Community Admin on 03-Apr-2012 00:00

Hi all,
  
     How can i create a custom user control for my navigation menu in sitefinity5.0.Can any one give me a sample code or instruction for the same.

Regards,
Vaiga

Posted by Community Admin on 05-Apr-2012 00:00

Hello Vaiga,

Since our default navigation controls are based on the RadControls, you can use these controls to create a custom navigation - for example RadMenu, RadTabStrip, RadTreeView, RadPanelBar etc. Simply add the chosen control to an .ascx file and use SitefinitySiteMapDataSource to bind it to pages in Sitefinity. Here's an example control that uses RadPanelBar:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PanelBar.ascx.cs" Inherits="SitefinityWebApp.Controls.PanelBar" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
<telerik:RadPanelBar ID="RadPanelBar1" runat="server"
    DataSourceID="SiteMapDataSource1">
</telerik:RadPanelBar>

Kind regards,
Jen Peleva
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed