Custom Sitefinity 3.x UL Menu using Sitefinity SiteMap

**If you are looking for Sitefinity 4.0+ custom navigation controls, please visit my new post about Sitefinity 4 Custom Menus**
Sitefinity comes built-in with a standard control for rendering a site menu based off of the SiteMap structure of your pages contained within the CMS. By using this control, there are many customizable options that come standard, such as a Sitefinity page selector for a starting node, dropdown menus are automatically created for pages with Children, and the JavaScript is included already for everything to work in many browsers.

However, there are times that all of these options, JavaScript files, and menu parameters aren’t needed. A simple, unordered-list (ul menu) menu will do the job just fine. Below you will find a custom menu control for Sitefinity, with a starting node Page Selector item included.


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TopNavigation.ascx.cs" Inherits="Custom_UserControls_TopNavigation" %>
<asp:SiteMapDataSource ID="TopNavStart" runat="server" ShowStartingNode="false" />
<asp:Repeater runat="server" ID="TopNavList" DataSourceID="TopNavStart">
 <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Url") %>' Text='<%# Eval("Title") %>'></asp:HyperLink>



using Telerik;
using Telerik.Cms;
using Telerik.Cms.Web;
using Telerik.Web.UI;
using Telerik.Caching;
using Telerik.Cms.Web.UI;

public partial class Custom_UserControls_TopNavigation : System.Web.UI.UserControl
 protected void Page_Load(object sender, EventArgs e)


 #region Properties
 [WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")]
 public string StartingNodeUrl
 return this.TopNavStart.StartingNodeUrl;
 this.TopNavStart.StartingNodeUrl = value;


The next step is to add the custom control to the Sitefinity ToolBoxControls in your web.config file. *Alternatively, you can upload the control via Sitefinity’s toolbox upload.

<add name="Custom Menu" section="Sitefinity Dev" url="~/Custom/UserControls/TopNavigation.ascx" description="Custom Menu Control with Starting Node Page Selector" />

Once the menu control is added to the toolbox, you can now edit a page, and drag the control over onto the page where needed.

Sitefinity starting node url for custom menu control

Sitefinity starting node url for custom menu control

Posted in, C-Sharp, C#, Sitefinity