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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

flyout menu

Go to End

3 Posts   1658 Views


Community Member, 199 Posts

18 September 2008 at 1:49am

Edited: 18/09/2008 1:50am

"Heres a menu that would be relatively easy to use for your site -"

I want to use the flyout menu that Willr recommended above. I have all the CSS working etc but am unsure as to what code i need in the template for the actual flyout bit to work. First level appears perfectly but I can't get the flyout (sub menu) to appear. I've tried various control brackets but with no luck yet.

Much appreciated as always.

Cheers. Briohny.


Community Member, 470 Posts

18 September 2008 at 5:09am

This is what I use for my suckerfish menus which are probably pretty similar to that.

<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>
                <% control Children %>               
                	<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
                <% end_control %>
         <% else %>
         	<li id="nav-$URLSegment"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div></li>
         <% end_if %>
         <% end_control %>

You can clean up the html and modify it to your liking. I have extra <div> tags in there due to using image rollovers for the main links.

You can also keep nesting the children controls if you need more than 1 level.

Hopefully that can get you started.


Community Member, 199 Posts

18 September 2008 at 5:17am

That did the trick! Thanks very much for your help. Really appreciated. :)