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.

General Questions /

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

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

Navagation Question

Go to End

2 Posts   760 Views


Community Member, 4 Posts

14 September 2010 at 7:17am

Coming from a design background with static HTML/CSS website experience.
Not sure how or if this is possible.

I have a design that has a horizontal navigation across the top of the site, and what I want to know. Is it possible to have the navigation split in two? Can I have 4 links on one side (own div) then a logo/graphic separator (background image) then another 4 links (own div)?

Thanks in advance for any help.


Community Member, 271 Posts

14 September 2010 at 7:36am

Edited: 14/09/2010 7:37am

Recently I needed the Sitelogo centered with a link to the Homepage and the other menuitems left and right from it.

I solved it like this:

<!-- -->
 	<% control Menu(1) %>	  
  		<li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode"><% if ClassName = HomePage %><img src="themes/sometheme/images/logo.jpg" /><% else %><span>$MenuTitle.XML</span><% end_if %></a></li>
   	<% end_control %>

Note that in this example I have 1 HomePage PageType and the contenteditor is responsible for adding the right amount of pages before and after the homepage.

If you use 1 language and don't want to create a seperate HomePage pageclass you van replace:

if ClassName = HomePage


if URLSegment = home

Hope this points you to the right direction.