1268 Posts in 351 Topics by 486 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1460 Views |
-
Menu with parent and child pages always showing

23 January 2011 at 2:08pm
I'm a total SS newb and a graphic designer by trade so I'm a touch out of my depth – trying to pick it up as I go along.
I'm trying to build a site navigation that works like this example: http://www.everythingdesign.co.nz/test/la-cigale/
I need to have the Main pages and subpages always visible. I've been through the initial tutorials and got to the stage where I have a submenu appearing on the parent pages but I need to weave the two menus together and keep them visible.
The way I constructed the example menu above was to put each group of 'Main and sub menu' in a div of its own so that I could use the bottom border in css to seperate them. There may be a better way to do that too.
Can anybody help?
Cheers. -
Re: Menu with parent and child pages always showing

23 January 2011 at 5:12pm
Could you post the code you've used for so far? If you want to whole submenu shown of each main level menu then you can do something like
<% control Menu(1) %>
<a href="$Link">$MenuTitle</a>
<% control Children %>
<a href="$Link">$MenuTitle</a>
<% end_control %>
<% end_control %>http://doc.silverstripe.org/sapphire/en/reference/built-in-page-controls has all the information about the available controls.
-
Re: Menu with parent and child pages always showing

23 January 2011 at 7:34pm
Thanks Willr.
Definitely getting there with your code.
At the moment I've got:
<div id="left">
<div class="menu">
<% control Menu(1) %>
<a class="menu bold" href="$Link">$MenuTitle</a>
<% control Children %>
<a class="menu" href="$Link">$MenuTitle</a>
<% end_control %>
<% end_control %>
</div>
</div>I just need to organise each grouping into seperate divs somehow. Again, any ideas would be much appreciated.
Thanks.
-
Re: Menu with parent and child pages always showing

23 January 2011 at 8:26pm
Actually, just got it.
Fantastic.
Thanks for your help.
| 1460 Views | ||
|
Page:
1
|
Go to Top |


