This is the full code-behind for the control.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using Telerik.Sitefinity;
namespace AkesocareWeb.UserControls
/// <summary>
/// Wrapper with header around the new SF4.4 SiteMenu control.
/// </summary>
public partial class SiteMenuWithHeader : System.Web.UI.UserControl
#region Fields
#endregion
#region Properties
[Browsable(true),
Category("Form Fields"),
Description("Allows the administrator to customize the properties of this label.")]
public Label NavHeading
get return this.txtNavHeading;
set this.txtNavHeading = value;
/// <summary>
/// Exposes the SiteMenu control with all properties.
/// </summary>
[Browsable(true)]
public Telerik.Sitefinity.Web.UI.NavigationControls.SiteMenu NavigationMenu
get return this.SiteMenu1;
set this.SiteMenu1 = value;
#endregion
#region Events
protected void Page_Load(object sender, EventArgs e)
SetMenuHeading();
#endregion
#region Methods
#region Private Methods
/// <summary>
/// If no heading is provided by the sitefinity administrator
/// grab the Menu label for the current page to display
/// as the heading for this control.
/// </summary>
private void SetMenuHeading()
if (string.IsNullOrEmpty(this.txtNavHeading.Text))
var currentNode = Telerik.Sitefinity.Web.SiteMapBase.GetActualCurrentNode();
if (currentNode != null)
txtNavHeading.Text = currentNode.Title;
#endregion
#region Public Methods
#endregion
#endregion