How to create a second Layer in the Home Menu / Top Menu ca. for Sitemap, Contact, ... how can create with the silverstripe functionality?
Thanks for help?
---Stooni!
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.
How to create a second Layer in the Home Menu / Top Menu ca. for Sitemap, Contact, ... how can create with the silverstripe functionality?
Thanks for help?
---Stooni!
Not sure exactly what you mean by 2nd layer.
Do you want like a suckerfish/drop down navigation?
If so, this code below works for me. Make some minor adjustments to the html as I setup mine to use images for the nav, and thus need some extra code.
<ul id="nav">
<% control Menu(1) %>
<% if Children %>
<li id="nav-$URLSegment"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div>
<ul>
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
<% end_control %>
</ul>
</li>
<% else %>
<li id="nav-$URLSegment"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div></li>
<% end_if %>
<% end_control %>
</ul>
these way show me every 2. Layer in the menu i mean these way see, the attachment!
Bunheng
I am having the same trouble, to create additional navigation on my website, it would be helpful if some one can solve this problem.
Thanks
Well, it's pretty simple.
Create a new Page, name it something like 'header-menu' and make sure 'Show in Menus' & 'Show in Search' is disabled. Insert all the pages you want in this Page(-Holder).
After this you go to your template and build a second menu. Something like:
<% if ChildrenOf(header-menu) %>
<ul id="header-menu" class="level_1">
<% control ChildrenOf(header-menu) %>
<li class="$FirstLast"><a href="$Link" title="$Title">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>