Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » having second level navigation sidebar on the blog

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1348 Views
  • Matt Hardwick
    Avatar
    Community Member
    61 Posts

    having second level navigation sidebar on the blog Link to this post

    Is this possible?

    I made a mock-up in paint to demonstrate.

  • Matt Hardwick
    Avatar
    Community Member
    61 Posts

    Re: having second level navigation sidebar on the blog Link to this post

    Ok I've done it... dunno if it's acceptable to have done it this way, but it works!

    First of all copy

    themes/mythemename/templates/Includes/SideBar.ss
    to
    blog/templates/Includes/BlogNavSide.ss

    edit BlogNavSide.ss to remove the first opening div tag, it should look something like this - and is probably the first line;

    <div id="Sidebar" class="typography">

    Also remove the corresponding closing div tag at the end of the file. We do this because that div is already declared by the file that will be including this file.

    Then you want to edit blog/templates/Includes/BlogSideBar.ss and enter
    <% include BlogNavSide %> either above or below the $Sidebar line depending on whether you want the nav above or below the widgets. (make sure you get it right first time). BlogSideBar.ss should now look like this;

    <div id="Sidebar" class="typography">
    <% include BlogNavSide %>
    $SideBar
    </div>

    Save and there you go, it should work. I had some troubles with caching (despite cache being turned off) - so I found I had to delete the contents of tmp to get it working properly - this is located in different places for different servers so I can't tell you where it is, but on a lot of VPS machines it's /tmp and in cPanel it's the root of your home folder e.g. /home/jon/tmp .

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