Jump to:

3434 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Showing Deep Subpages on Sidebar?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1205 Views
  • ginger
    Avatar
    Community Member
    9 Posts

    Showing Deep Subpages on Sidebar? Link to this post

    My subpages go 4 pages deep. The sidebar in Blackcandy only shows three levels. Can I modify the sidebar.ss template to show the fourth level in the sidebar? I've searched the forums but couldn't find the answer.

  • ginger
    Avatar
    Community Member
    9 Posts

    Re: Showing Deep Subpages on Sidebar? Link to this post

    I just want to clarify: I have the first level in the tabs at the top and then I want to show three sub-levels in the sidebar. Here's my sidebar code as it stands now:

    <div id="Sidebar" class="typography">
       <div class="sidebarBox">
          <h3>
          <% control Level(1) %>
          $Title
          <% end_control %>
          </h3>
          
          <ul id="Menu2">
          <% control Menu(2) %>
           <% if Children %>
          <li class="$LinkingMode"><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span> <em>$MenuTitle.XML</em></span></a>
           <% else %>
          <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>
          <% end_if %>   
              
           <% if LinkOrSection = section %>
           <% if Children %>
          <ul class="sub">
          <li>
          <ul class="roundWhite">
          <% control Children %>
          <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levelb"><span><em>$MenuTitle.XML</em></span></a></li>

                               <% end_control %>
                            
    </ul>
                         </li>
                      </ul>
                    
                <% end_if %>

    <% end_if %>
             </li>
             <% end_control %>
          </ul>
          <div class="clear"></div>
       </div>
       <div class="sidebarBottom"></div>
    </div>

  • ginger
    Avatar
    Community Member
    9 Posts

    Re: Showing Deep Subpages on Sidebar? Link to this post

    anyone?

  • butch
    Avatar
    Community Member
    1 Post

    Re: Showing Deep Subpages on Sidebar? Link to this post

    A solution would be awesome...

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: Showing Deep Subpages on Sidebar? Link to this post

    Have you tried simply adding another <% if Children %><% control Children %> .levelc block? The code is hard to read…

    1205 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.