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.

Customising the CMS

mega menu - second level menu


Reply

736 Views

Avatar
suresh

6 March 2012 at 5:38am Community Member, 1 Post

Hi, I am developing a site using silver stripe. In that, I have to create a mega menu with two levels. When user hover on first level menu item, second level menu will be displayed for that item. In the second menu, I have different categories (skills, jobs, trainings) and these are not clickable and not children of first level menu item. second level menu items will be grouped under these categories. I did the following script to display second items but I don't know how to group second level items in to respective categories. Please check out this link http://www.useit.com/alertbox/mega-dropdown-menus.html for more information.

<% control Menu(1) %>
<li>
<div class="left{$LinkingMode}"></div>
<div class="$LinkingMode">
<div style="margin-top:5px;">
<a href="$Link" title="$Title.XML" class="$LinkingMode">$MenuTitle.XML</a>
<% if Children %>
<div id="$Title" class="sectionElement">
<ul>
<% control Children %>
<div>
<li><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a></li>
<div>
<% end_control %>
</ul>
</div>
<% end_if %>
</div>
</div>
<div class="right{$LinkingMode}"></div>
<div class="menuspace">&nbsp;</div>
</li>
   <% end_control %>