More in this section
Forums / Designing with Sitefinity / SiteMenu ItemTemplate not pulling Description

SiteMenu ItemTemplate not pulling Description

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
4 posts, 0 answered
  1. ColinBowern
    ColinBowern avatar
    20 posts
    12 Aug 2012
    29 Aug 2008
    Link to this post

    I'm trying to pull the description from the site node and it appears that it isn't being bound to the CmsSiteMapNode.  Is there any other way to grab the page description field?

    <radM:RadMenu ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1" OnItemDataBound="RadMenu1_ItemDataBound" Skin="None">  
            <href="<%# Eval("Url") %>"><%#Eval("Title")%><br /> 
                <span><%# Eval("Description")%></span></a> 

  2. Pepi
    Pepi avatar
    981 posts
    31 Jan 2017
    01 Sep 2008
    Link to this post
    Hello Colin,

    A possible solution is to implement the required functionality in the RadMenu1_ItemDataBound event handler. Here is a simple example:

    <asp:SiteMapDataSource ID="SitemapDataSource1" runat="server" ShowStartingNode="false" /> 
    <radM:RadMenu ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1" OnItemDataBound="RadMenu1_ItemDataBound" Skin="None"

    public void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e) 
            CmsSiteMapNode cmsNode = e.Item.DataItem as CmsSiteMapNode; 
            if (cmsNode != null
                e.Item.Text = e.Item.Text + "<br/>" + cmsNode.CmsPage.Description; 

    Do let us know if you need any further assistance.

    Sincerely yours,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Zahid Ali
    Zahid Ali avatar
    47 posts
    16 Nov 2009
    03 Jan 2010
    Link to this post

    How to use Item template and be able to add description too?

    The solutions suggested by Pepi, doesn't work with ItemTemplate.


  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    04 Jan 2010
    Link to this post
    Hello Zahid Ali,

    If you use RadMenu templates you have to access the controls in the template ans set desired text  - in your case CmsPage description.

    RadMenuItem item = RadMenu1.FindItemByText("AboutUs");
    Label lbl = (Label)item .FindControl("Label1");
    if(lbl !=null)
     lbl.text = lbl.text + cmsNode.CmsPage.Description;

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered