Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » flyout menu

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

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

Page: 1
Go to End
Author Topic: 1379 Views
  • Briohny
    Avatar
    Community Member
    199 Posts

    flyout menu Link to this post

    "Heres a menu that would be relatively easy to use for your site - http://www.cssplay.co.uk/menus/flyoutt.html"

    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.

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: flyout menu Link to this post

    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>
       <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>

    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.

  • Briohny
    Avatar
    Community Member
    199 Posts

    Re: flyout menu Link to this post

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

    1379 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.