More in this section

Forums / Developing with Sitefinity / Can you list a page in the menu twice?

Can you list a page in the menu twice?

4 posts, 0 answered
  1. Andrew
    Andrew avatar
    29 posts
    Registered:
    24 Jun 2009
    29 Jul 2009
    Link to this post
    I have a rather complex menu structure as there are over 200 pages on this site I am working on.  There are a couple pages that it makes sense to link to from a couple of menus,  is it possible to link to the same page twcie in the menu?  I can't find any way to manually create a menu entry without creating a page for it?

    Thanks!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jul 2009
    Link to this post
    Hi Andrew,

    You can add the logic below to your RadMenu control. If we find an node with Text = "test" we duplicate the node in RadMenuItem list.

        protected void Page_Load(object sender, EventArgs e) 
        { 
            RadMenu1.DataBind(); 
            IList<RadMenuItem> items = RadMenu1.GetAllItems(); 
            foreach (RadMenuItem menuItem in items) 
            { 
                if (menuItem.Text == "test"
                { 
                    RadMenuItem newItem = new RadMenuItem(); 
                    newItem.Text = "test"
                    newItem.NavigateUrl = "http://www.yahoo.com"
                    RadMenu1.Items.Add(newItem); 
                } 
            } 
     
        } 


    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Andrew
    Andrew avatar
    29 posts
    Registered:
    24 Jun 2009
    30 Jul 2009
    Link to this post
    Good Morning Ivan,

    How would this then work inside Sitefinity?  My clients who can barely type on a computer, can't be expected to be editing code behinds?

    Thanks!
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jul 2009
    Link to this post
    Hello Andrew,

    It is a custom requirement that does not exist by default. You can create a user control or some page where you can implement similar logic, so that it will be more convenient for your users to create new items. Generally there is no way show new RadMenuItem in the RadMenu without crating it. Otherwise you should use Sitefinity's UI and create a new page which you want to avoid.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered