21293 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1408 Views |
-
How To create 2. Layer in the Menu

25 December 2008 at 4:48am
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!
-
Re: How To create 2. Layer in the Menu

25 December 2008 at 5:26am
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> -
Re: How To create 2. Layer in the Menu

29 December 2008 at 11:56pm Last edited: 29 December 2008 11:57pm
these way show me every 2. Layer in the menu i mean these way see, the attachment!
-
Re: How To create 2. Layer in the Menu

5 October 2010 at 9:41pm
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
-
Re: How To create 2. Layer in the Menu

5 October 2010 at 11:44pm
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 %>
| 1408 Views | ||
|
Page:
1
|
Go to Top |


