views:

237

answers:

1

1) i need set different class name for every menu item, based on a menu row (iterating, i need just a number)

<% control Menu(1) %>
<div class="mainmenu-item-$MenuItemRow"><a href="$Link">$MenuTitle</a></div>
<% end_control %>

2) is there a simple way to create an small second menu ?

+3  A: 
<% control Menu(1) %>
    <div class="mainmenu-item-$Pos"><a href="$Link">$MenuTitle</a></div>
<% end_control %>

http://doc.silverstripe.org/built-in-page-controls#dataobjectset_options

Question 2:

if it should just show another level of your navigation you can use eg. <% control Menu(2) %>. And maybe this thread helps you about how to display only special items: http://silverstripe.org/archive/show/197044. Think also of the possibility that you could have menu items in your page tree for you sub-navigation that are only redirects to items somewhere else in the hierarchy! So you could eg. create a seperate "Footer" branch in your page tree and use:

<div class="footer">
    <% control ChildrenOf(footer) %>
        <span>
            <a href="$Link" title="Go To '$MenuTitle.XML'">$MenuTitle.XML</a>
        </span>
    <% end_control %>
</div>
lazerscience
eg One menu on top (normal menu) and another on bottom, or left/right. different menu items on both of them. both unrelated.
alienv