1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / User Control For Navigation

User Control For Navigation

2 posts, 0 answered
  1. Vaiga
    Vaiga avatar
    26 posts
    Registered:
    27 Feb 2012
    03 Apr 2012
    Link to this post
    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
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    05 Apr 2012
    Link to this post
    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
2 posts, 0 answered