Jump to:

23471 Posts in 18937 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Navagation Question

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
Go to End
Author Topic: 609 Views
  • VirtuallyUknown
    Avatar
    Community Member
    4 Posts

    Navagation Question Link to this post

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

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: Navagation Question Link to this post

    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:

    <!-- Navigation.ss -->
    <ul>
       <% 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 %>
    </ul>

    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

    with

    if URLSegment = home

    Hope this points you to the right direction.

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