Software Blog

Posted under: Web Development

If you need to ensure that the RadPanelBar control (which I use for sidebar navigation) remains expanded, check out the RadPanelbar1_ItemDataBound method in the control located at /Sitefinity/UserControls/Navigation35/SitePanelBar.ascx.

This control checks the hideUrlForGroupPages, removing the link if set to true on your control. However, this doesn't prevent the link from being active, collapsing the nodes when clicked. I need my menu to be fully expanded, so I modified the code using some newly discovered properties in the e (RadPanelEventArgs) parameter:

public void  RadPanelbar1_ItemDataBound(object  sender,  RadPanelBarEventArgs  e)
{
     if  (!hideUrlForGroupPages)  return;

     var  node = e.Item.DataItem  as  CmsSiteMapNode;
     if  (node ...
Full story