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.

Themes

Discuss SilverStripe Themes.

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

Problems with BrightSide and SilverStripe 2.3.1


Reply

2 Posts   1333 Views

Avatar
squap

26 March 2009 at 12:50am Community Member, 9 Posts

Hi,

I am new to SilverStripe and web development in general. I read all the tutorials and wanted to start out with the BrightSide theme.

First problem was that with a fresh installation BrightSide requires the blog module. I could either comment out the lines in Page.ss with "blog" in it or install the blog module. I decided for the latter bringing me to the problem I could not figure out :

On the Home page the theme is supposed to show the lates Blog posts in the right sidebar. Apparently "<% if ChildrenOf(Blog) %>" fails in Page.ss , why is that ?

Avatar
squap

6 April 2009 at 7:22pm Community Member, 9 Posts

Ok I replaced the rightbar code with :

    <h1>Last Blog Post</h1>
    <% control LatestNews %>
    <h3>$MenuTitle</h3>
    <p>$Content.LimitWordCount(30) <br ><a href="$Link">Read the full post</a></p>
    <% end_control %>

(similar to the tutorial code) and now it works.

I have another question you might be able to help.

How can I highlight the current tab of the selected page. The theme comes with highlighting on hover. I know that SilverStripe comes with the LinkingMode class, which returns the status. My problem is with the css in Brightside, which I don't understand. As far as I understand this is the relevant code in typography.css :

/* menu tabs */
.typography #header a {
   float:left;
   background: url(../images/tablef.gif) no-repeat left top;
   margin:0;
   padding:0 0 0 4px;
   text-decoration:none;
}
.typography #header a span {
   float:left;
   display:block;
   background: url(../images/tabright.gif) no-repeat right top;
   padding:6px 15px 3px 8px;
   color: #FFF;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
.typography #header a span { float:none; }
/* End IE5-Mac hack */
.typography #header a:hover span { color:#FFF; }
.typography #header a:hover { background-position:0% -42px; }
.typography #header a:hover span { background-position:100% -42px; }
.typography #header #current a {
   background-position:0% -42px;
   color: #FFF;
}
.typography #header #current a span {
   background-position:100% -42px;
   color: #FFF;
}

How can I make it hightlight the current visited page ?