Forums / Designing with Sitefinity / Two different navigation bars

Two different navigation bars

6 posts, 0 answered
  1. Andy Smith
    Andy Smith avatar
    2 posts
    Registered:
    02 Sep 2009
    16 Apr 2010
    Link to this post
    We are developing a site that will have navigation across both the top and down the left.  How do we specify certain pages to only display in the tab menu and other pages to only display in the panel bar? 

    Please advise and thanks in advance.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16063 posts
    Registered:
    24 Sep 2012
    18 Apr 2010
    Link to this post
    Hello Andy Smith,

    The SiteMenu has a property called StartingNodeUrl which you can use to select the starting node from where the RadMenu binding will start. You can add the code below to the SitePanelBar or your custom control to expose  the same functionality for the RadPanel bar control

    [WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")]
       [Browsable(true)]
       [Category("Navigation")]
       public string StartingNodeUrl
       {
           get
           {
               return this.SiteMapDataSource1.StartingNodeUrl;
           }
           set
           {
               this.SiteMapDataSource1.StartingNodeUrl = value;
           }
       }

    Another option is creating a custom controls and bind them to the pages you want.

    You may find this post useful - SiteMenu Builder
    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. shae
    shae avatar
    30 posts
    Registered:
    26 Jul 2012
    28 Sep 2010
    Link to this post
    I've tried adding the code above to the PanelBar control but I am geeting the following errors:

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0246: The type or namespace name 'WebEditor' could not be found (are you missing a using directive or an assembly reference?)

    Source Error:

    Line 180:    /// </summary>
    Line 181:    /// 
    Line 182:    [WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")]
    Line 183:    [Browsable(true)]
    Line 184:    [Category("Navigation")]

    what can I do to get this working?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16063 posts
    Registered:
    24 Sep 2012
    28 Sep 2010
    Link to this post
    Hi shae,

    You have to add reference to Telerik.Cms.Web.UI.WebEditorAttribute

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Andre
    Andre avatar
    10 posts
    Registered:
    29 Dec 2011
    25 Jan 2012
    Link to this post
    How do I add the reference to this? I tried adding
    using Telerik.Cms.Web.UI.WebEditorAttribute;

    But I get the error:
    c:\Program Files\Telerik\Sitefinity3.7\WebSites\HCE2\Sitefinity\UserControls\Navigation35\SitePanelbar.ascx.cs(18): error CS0138: A using namespace directive can only be applied to namespaces; 'Telerik.Cms.Web.UI.WebEditorAttribute' is a type not a namespace
  6. Andre
    Andre avatar
    10 posts
    Registered:
    29 Dec 2011
    25 Jan 2012
    Link to this post
    I figured it out, it should be:
    [Telerik.Cms.Web.UI.WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")]
Register for webinar
6 posts, 0 answered