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.

Themes /

Discuss SilverStripe Themes.

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

Questio LazyDays: Sub-Sub-Menu


Reply


5 Posts   2917 Views

Avatar
Erikh112

Community Member, 9 Posts

17 January 2009 at 9:04am

Hello,

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

Thanks

Greetings...

Erik

Avatar
Nivanka

Community Member, 400 Posts

19 January 2009 at 10:13pm

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 %>

Avatar
Erikh112

Community Member, 9 Posts

26 January 2009 at 5:02am

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

Avatar
JensR

Community Member, 8 Posts

23 April 2009 at 9:41am

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

Avatar
JensR

Community Member, 8 Posts

23 April 2009 at 9:43pm

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 %>