Jump to:

1379 Posts in 490 Topics by 520 members

Themes

SilverStripe Forums » Themes » Questio LazyDays: Sub-Sub-Menu

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 2868 Views
  • Erikh112
    Avatar
    Community Member
    9 Posts

    Questio LazyDays: Sub-Sub-Menu Link to this post

    Hello,

    is it possible to define a second sub-menu in the lazyDays Theme? May you show me an easy way.

    Thanks

    Greetings...

    Erik

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Questio LazyDays: Sub-Sub-Menu Link to this post

    You should be able to do this.

    To get the menu items which are on the third level and under them you can use the following code

    <% control Menu(2) %>

    <% if Children %>
    <ul>
    <% control Children %>
    <li><a href="$Link">$MenuTitle</a></li>
    <% if end_control %>
    </ul>
    <% end_if %>

    <% end_control %>

  • Erikh112
    Avatar
    Community Member
    9 Posts

    Re: Questio LazyDays: Sub-Sub-Menu Link to this post

    Thanks for your help.

    Could you please tell me in which file i have to replace or add it ? I haven't found it yet.

    Thank You

    Greetings

    Erik

  • JensR
    Avatar
    Community Member
    8 Posts

    Re: Questio LazyDays: Sub-Sub-Menu Link to this post

    I also would appreciate some deeper advice on where to put this code since I'm completely new to CMS, Silverstripe and PHP.

    Thanks in advance,

    Jens

  • JensR
    Avatar
    Community Member
    8 Posts

    Re: Questio LazyDays: Sub-Sub-Menu Link to this post

    I think, I'm beginning to get the SilverStripe logic...

    I decided to go with another kind of navigation, only showing the parent of the page (if existing) and the children of the current page.

    Regards,

    Jens

    <h2>
       <% if Parent %>
          <% control Parent %>
             <a href="$Link" <% if LinkingMode = current %>class="currentSubLink" <% end_if %> title="Gehe zu">$MenuTitle</a>
          <% end_control %>
       <% else %>
          $Title
       <% end_if %>
    </h2>

    <% if Title = Blog %>
    <% else %>
       <% if Title = Forums %>
       <% else %>
          <ul class="sideMenu">
             <li class="here">
                <ul>
                <% control Children %>
                      <li>
                      <a href="$Link" <% if LinkingMode = current %>class="currentSubLink" <% end_if %> title="Gehe zu">$MenuTitle</a>
                      </li>
                <% end_control %>
                </ul>
             </li>
          </ul>
       <% end_if %>
    <% end_if %>

    2868 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.