Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

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

How to do a "Main Menu" with childrens


Reply

2 Posts   1043 Views

Avatar
Axl Rose

29 September 2008 at 8:30am (Last edited: 29 September 2008 8:59am), Community Member, 7 Posts

I'am modifing the BlackCandy template, and I want to have a sidebar with ALL sections (home, information, photos, ecc) in every section (not just sidebar "about us" on "about us" section). Something like this:

Home
Information
-History
-Biography
Photos
-Axl
-Slash
Contact

I can do that, but when I have a 3rd level (for example, Information->Biography->Axl) it doesn't show (It should be shown only when someone clicks on "Biography").

EDIT: I've just got it. Here's the code:

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

Avatar
Phalkunz

29 September 2008 at 11:09am 69 Posts

It should be like the following.

<% control Menu(1) %>
   $Title<br/>
   
   <% control Children %>
   
      --- $Title <br/>
      
      <% control Children %>
         ------ $Title <br/>
      <% end_control %>
      
   <% end_control %>
   
<% end_control %>