+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / SitePanelbar display top-level

SitePanelbar display top-level

9 posts, 1 answered
  1. Godthaab
    Godthaab avatar
    22 posts
    Registered:
    06 Oct 2003
    31 Aug 2009
    Link to this post
    Hi

    I'm using a SitePanelbar (v3.7) and I want only to show the top level until you click on a topic.
    I have set EnableEmbeddedSkins="false" and EnableEmbeddedBaseStylesheet = "false" in my skin file.
    If I set EnableEmbeddedBaseStylesheet = "true" it appears as I want, but I would not use EmbeddedBaseStylesheet.

    How can I get SiteBar to behave like that?

    Thanks and best regards,
    Bo


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    31 Aug 2009
    Link to this post
    Hi Godthaab,

    I could not get a really clear image on what is the common between showing only top level items and embedded resources. If you are using custom skin the only thing you should disable is EnableEmbededSkins by setting this property to false.

    However below is a js code that shows only first level items. The child items are shown only on click by expanding without making a post back.

    <script type="text/javascript">  
    function OnClientItemClicking(sender, args)  
    {  
       var item = args.get_item();  
       if (item.get_level()==0)  
       {  
           args.set_cancel(true);  
           item.set_expanded(!item.get_expanded());  
       }  
       else  
       {  
          args.set_cancel(false);  
       }  
    }  
      
    </script>  


    Sincerely yours,
    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.
  3. Godthaab
    Godthaab avatar
    22 posts
    Registered:
    06 Oct 2003
    31 Aug 2009
    Link to this post
    Hi Ivan,
    Ok, it might be a little hard to explain properly, but I have rephrased the question.
    Please try with your own template default “Company Inspiration ". 
    Under "About Us" Create a new page under "Our mission" as "our-mission2" use Inspiration.master. Then "View live page in a new window" and see the left navigation. 

    Then go to Panelbar.skin. 
    Removes or sets the line EnableEmbeddedBaseStylesheet = "true" then the navigation, as a starting point as I want it, but I want to use EnableEmbeddedBaseStylesheet = "false".

    If I paste your script in Inspiration.master (<head>...</head>) am I not getting the desired effect.

    We have a client who wants to convert to Sitefinity Standard v. 3.7 and the client wants the same navigation/look as the present: http://www.nfs.as

    Best regards, 
    Bo

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    31 Aug 2009
    Link to this post
    Hello Godthaab,

    To get the same menu you can add your PanelBar control in projects template. There set

    StartingNodeOffset = 1
    StartFromCurrentNode = false
    ShowStartingNode = false

    Create a home page and there add a new PanelBar control. Go to your PanelBar control declaration and add a new hyperlink control. Then if you are on the home page - hide the link otherwise - show it.

               CmsSiteMapNode hiddenNode = SiteMap.CurrentNode as CmsSiteMapNode; 
                if (hiddenNode != null && hiddenNode.Title.Equals("PseudoHome")) 
                { 
                    this.Link1.Visible = false
                } 


    Regards,
    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.
  5. Godthaab
    Godthaab avatar
    22 posts
    Registered:
    06 Oct 2003
    31 Aug 2009
    Link to this post
    Hi Ivan 
    I'm sorry, but I think that we are talking completely past each other. 

    What I want is just that SitePanelbar only shows the top level and when you click, the underlying pages. As in this example I am about to convert: http://www.nfs.as/afdelinger

    Best regards,
    Bo

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    31 Aug 2009
    Link to this post
    Hello Godthaab,

    If you try the suggested approach you will  see that it works in the same way as the navigation from the other website. StartingNodeOffset = 1 will hide all parents when you are on Level 1 item. The parent has level 0 which we are hiding.

    All the best,
    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.
    Answered
  7. Godthaab
    Godthaab avatar
    22 posts
    Registered:
    06 Oct 2003
    01 Sep 2009
    Link to this post
    I can not understand that if I use the example

    EnableEmbeddedSkins = "true" 
    EnableEmbeddedBaseStylesheet = "true" 
    Skin = "WebBlue" 

    Panelbar works on my site as I want. If I however use

    EnableEmbeddedSkins = "false" 
    EnableEmbeddedBaseStylesheet = "false" 
    Skin = "mySkin" 

    it does not work - top and ChildPage appears.

    Why must it be so difficult and illogical to customize Panelbar? 
    It may not be correct, that you can only use Telerik EmbeddedSkins to avoid a lot of hassle.
    I think it is odd that Sitefinity not have some better learning templates. There are no templates which have more than one ChildPage. The site I am about to build is > 600 pages. Here it is not usable with only one ChildPage.
    Once again, I have set Panelbar as:

    StartingNodeOffset = 1 
    Start From Current Node = false 
    Shows Starting Node = false 
    MaxDataBindDepth =- 1 

    I could not get your advice to work. Maybe because I do not understand what you mean...

    Regards,
    Bo

    2. sep. 2009
    Now I am happy again :-) All my problems were solved under the topic:

    Developing with Sitefinity: 
    http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/controlling-the-expanded-property-of-a-radpanelitem.aspx


  8. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    03 Sep 2009
    Link to this post
    Hello Godthaab,

    Panel bar needs some of the basic CSS that in your case is switched off to behave properly. Add the CSS from below to your Panel bar stylesheet file to see if that will work. I have also attached the whole basic CSS file so you can copy some other CSS rules if you think they are needed.

    /* PanelBar base css */ 
    .RadPanelBar .rpRootGroup, 
    .RadPanelBar .rpGroup, 
    .RadPanelBar .rpItem 
        margin: 0; 
        padding: 0; 
        list-style-position:outside; 
        list-style: none; 
     
    .RadPanelBar .rpSlide 
        position: static; 
        float: none; 
        height: auto; 
        overflow:hidden; 
        display:none; 
        zoom: 1; 
     
    .RadPanelBar .rpItem 
        float: none; 
        display: block; 
        position: static; 
    * html .RadPanelBar .rpItem { display: inline } 
    * html .RadPanelBar .rpGroup .rpItem { display: block } 
     
    .RadPanelBar .rpItem:after, 
    .RadPanelBar .rpText:after, 
    .RadPanelBar .rpTemplate:after 
        content: "";  
        display: block;  
        height: 0;  
        line-height: 0; 
        font-size: 0; 
        clear: both;  
        visibility: hidden; 
     
    .RadPanelBar .rpLink 
        cursor: pointer; 
        text-decoration: none; 
        overflow: hidden; 
        zoom: 1; 
     
    .RadPanelBar .rpLink:focus 
        outline: 0 none; 
     
    .RadPanelBar .rpText, 
    .RadPanelBar .rpOut, 
    .RadPanelBar .rpTemplate 
        overflow: hidden; 

    Let us know if you need further help.

    All the best,
    Katia
    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.
  9. Godthaab
    Godthaab avatar
    22 posts
    Registered:
    06 Oct 2003
    03 Sep 2009
    Link to this post
    Hi Katia, 
    Many thanks for your reply. I had noticed (from http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/radpanelbar-expand-collapse-behavior.aspx and http://dev29.testworx.co.uk) that it was the base css that made the difference.

    Thanks for the "official" explanation. So it was not so complicated after all. 
    "Knowledge is only when we know it" ;-)

    Kind regards,
    Bo

Register for webinar
9 posts, 1 answered