Hello,
is it possible to define a second sub-menu in the lazyDays Theme? May you show me an easy way.
Thanks
Greetings...
Erik
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hello,
is it possible to define a second sub-menu in the lazyDays Theme? May you show me an easy way.
Thanks
Greetings...
Erik
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 %>
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
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
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 %>