Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Drop Down Menus with Silverstripe

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2 3 4 5
Go to End
Author Topic: 14634 Views
  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Drop Down Menus with Silverstripe Link to this post

    I am trying to integrate a dropdown menu with a Silverstripe install. I see many posts about cssplay.co.uk and cssmenus.co.uk
    I really like what they've developed over there but have no idea whatsoever on how to integrate that into Silverstripe.

    I see that some of you have successfully done it and was wondering if I could get some help.
    Thanks!

    ~ James

  • D.K.
    Avatar
    Community Member
    20 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    Hi James,

    You will have to do some template coding, but here's a link: http://silverstripe.org/archive/show/15257.

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    D.K. thanks for your reply. I reviewed that link previously and I don't understand it. What template do I put that info into and do I reference it in all my page.ss, homepage.ss, etc?

    Thanks for your help!

    ~ James

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    Are you talking about a dropdown menu (like navigation) or a dropdown select form? I use the CSSPlay menus alot on my projects. Like californiawomen.org. I have attached an example Menu1.ss (the html needed) and Menu.css ( the css needed for it). You can just place the Menu.ss in yourtheme/templates/Includes/* and include it in your theme with <% include Menu1 %>. The CSS you can copy and put in your own CSS file or include this file seperatly

    I haven't attached all the images etc and you might need to tweak the styles for your project but should be a start for you.

    Attached Files
  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    Will, thank you for the reply. And for sharing your files!
    So, I add the css to my css.
    As for the menu1.ss, I add that to mytheme/templates/includes/
    And you say to add it into my theme with <% include Menu1 %>
    This last part is what I'm not sure how to do.
    I have two page.ss files.
    The first is in mytheme/templates/page.ss
    The second is in mytheme/templates/layout/page.ss
    What do I add to each of these page.ss files?

    Thanks again for your help Will!
    Very much appreciated.

    ~ James

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    well you put the <% include %> whereever you want the menu in your theme. Have a read of the first 2 tutorials so you understand the basics of the templates. Usually you would put that include in templates/Page.ss.

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    well you put the <% include %> whereever you want the menu in your theme. Have a read of the first 2 tutorials so you understand the basics of the templates. Usually you would put that include in templates/Page.ss.

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: Drop Down Menus with Silverstripe Link to this post

    Thank you Will. Everything's working great for me now - I appreciate your help!

    ~ James

    14634 Views
Page: 1 2 3 4 5
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.