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

Menu's: Integrated drop-down/fly-out menu into SS/cms


Go to End


8 Posts   26946 Views

Avatar
JonathanParker

Community Member, 37 Posts

15 May 2008 at 9:26am

If anybody is interested I've manage to integrate some drop-down & fly-out css only menu's into the SS/CMS framework (well via an included .ss file & some css).

Working examples can be found at www.dabnis-webdesign.com this is my testing site and the first menu is on the landing page.

I have attached the .ss file & the css file.

In essence all you need to do is replace the <% include Navigation %> line in the standard 'BlackCandy' theme page.ss file with <% include H_Navigation %>. make sure that you save the attached file in your templates/includes/ folder and the attached css file in the theme/them-name/css/ folder.

The last thing to do is to include the following in your page.php file.

Where you have Requirements::themedCSS("layout"); etc
add Requirements::themedCSS("lmenu2");

That should be it.

I may put a forum module on the test site!

Regards.

Jonathan

Avatar
JonathanParker

Community Member, 37 Posts

15 May 2008 at 9:28am

Edited: 16/05/2008 2:29am

I should also add that they validate as strict html 4.01 and also to css 2.1
They work in: ie6, ie7, ff2.0+, Opera9+; I have just been informed that they also work within Safari 3+

Regards.

Jonathan

Avatar
zyko

Community Member, 66 Posts

16 May 2008 at 3:38am

WOW, cool work :-)
g
Helmut

Avatar
Liam

Community Member, 470 Posts

16 May 2008 at 12:48pm

Edited: 16/05/2008 12:50pm

Good stuff. Thanks a lot. I build a lot of sites that use this type of menu, but I haven't with SS yet, as I haven't been using it that long.

I've been actually thinking about this issue so I've saved your file for reference in the future.

Not a fan of the tables, but the general concept is good.

*edit* It seems the download link doesn't work. Obviously I can just right click and save as, but developers might want to know this.

Avatar
Sean

Forum Moderator, 922 Posts

16 May 2008 at 3:41pm

Thanks for this. I've reported the download link problem as a bug. You can still click the file link, but it seems the "download" link is broken.

Cheers,
Sean

Avatar
steve_nyhof

Community Member, 224 Posts

5 June 2008 at 11:59am

How do I get the .ss file?
Thank you,
Steve

Avatar
Willr

Forum Moderator, 5523 Posts

5 June 2008 at 1:17pm

Steve - the SS files attached to the first post. You can right click save or just copy and paste into a file in your project as an include so save it as for example DropDownMenu.ss in yourtheme/templates/includes/ and then in your theme you just need to include DropDownMenu - <% include DropDownMenu %>

Avatar
steve_nyhof

Community Member, 224 Posts

5 June 2008 at 1:23pm

Sorry, I seen it was an html file and wasn't thinking it may have been renamed to be downloaded.
Thank you