Jump to:

5516 Posts in 1734 Topics by 1221 members

Customising the CMS

SilverStripe Forums » Customising the CMS » static content in sidebar

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

Page: 1
Go to End
Author Topic: 1372 Views
  • chrisio
    Avatar
    Community Member
    9 Posts

    static content in sidebar Link to this post

    Im really stuck in trying to get some basic static content into the sidebar. It will never change so being able to edit it is not important, I have added some html directly to the sidebar.ss and did a flush but I cant get it to show. I cant belive its this difficult to get a few extra lines to apear in the side bar.

    Can anyone help me please

    ###########content of sidebar.ss################

    <div id="Sidebar" class="typography">
       <div class="sidebarBox">
          <h3>
             Test heading
          </h3>
          test body
          
          <div class="clear"></div>
       
       
       
          <h3>
             <% control Level(1) %>
                $Title
             <% end_control %>
          </h3>
          
          <ul id="Menu2">
              <% control Menu(2) %>
              <% if Children %>
                  <li class="$LinkingMode"><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>
               <% else %>
                    <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>
                <% end_if %>   
              
                 <% if LinkOrSection = section %>
                    <% if Children %>
                      <ul class="sub">
                         <li>
                            <ul class="roundWhite">
                               <% control Children %>
                                  <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levelb"><span><em>$MenuTitle.XML</em></span></a></li>
                               <% end_control %>
                            </ul>
                         </li>
                      </ul>
                     <% end_if %>
                <% end_if %>
             </li>
             <% end_control %>
          </ul>
          <div class="clear"></div>
       </div>
       <div class="sidebarBottom"></div>
    </div>

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: static content in sidebar Link to this post

    Is your main template even including this file?

    The default theme has a <% if Menu(2) %> round it so it will only include the sidebar if there is a menu 2. If your theme has copied the default theme then you will need to remove the <% if Menu(2) %>s that are through out the page.ss template file.

  • chrisio
    Avatar
    Community Member
    9 Posts

    Re: static content in sidebar Link to this post

    I got it to work by modifying the page.ss which then made it rebuild the cache. Strange thing is, is that I thought by doing the flush all command I would clear the cache.

    Nevermind its in place now and alls well in the world!

    Chris

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