More in this section

Forums / Developing with Sitefinity / Custom PanelBar VS building own

Custom PanelBar VS building own

2 posts, 0 answered
  1. Richard
    Richard avatar
    77 posts
    24 Oct 2007
    06 May 2010
    Link to this post
    I would like to display links on the navigation PanelBar depending on a value of custom property of the pages (e.g.Boolean "Member of Staff View only?").  My issue is what is the most efficient and correct way to go about this.  Would it be better to customise the PanelBar by inheriting the class and adapting the control (if this is possible), or alternatively build the code and styles from scratch ?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    06 May 2010
    Link to this post
    Hello Richard,

    You should subscribe for ItemDataBound event where e.Item.DataItem is the CmsSiteMapNode. Then you could get the page and associated property and hide/show the item from the navigation. If you are binding the PanelBar to generic list of ICmsPage or Page objects you can exclude/include some of the items before databinding.

    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.
2 posts, 0 answered