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.

Template Questions /

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

Need help with theme.

Go to End

3 Posts   1664 Views


Community Member, 1 Post

31 July 2012 at 10:34pm

Edited: 31/07/2012 11:35pm

Hello My namn is Phil and have started to use SilverStripe.

I followed a tutorial how to make build your own theme on Silver


But i have some problems... The Template im using doesnt show anything besides some css colors..
And i dont know how too fix this, ive been looking around alot so now i'm asking you guys for help.

Here is my

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<% base_tag %>
<div id="website">
<div id="header">

<a href="#" class="logo"><img src="images/logo.jpg" alt="" width="195" height="80" /></a>
<ul id="menu">
<% loop Menu(1)%>
<li><a id="" class="$LinkingMode"<a href="$Link" id="active">$MenuTitle</li></a>
<% end_loop %>

<div id="brading">
<h1><a href="AbsoluteBaseURL">$SiteConfig.Title</a></h1>
<h1 class="tagline">$SiteConfig.Tagline</h1>
<div id="content">
<img src="images/title1.gif" alt="" width="271" height="41" /><br />
<div id="footer">
<div class="vlinks"><a href="">Web design</a> by <a title="Free Templates Online" href="">Free Templates</a> Online</div>

<map name="Map">
<area shape="rect" coords="27,41,562,88" href="#">
<area shape="rect" coords="589,2,724,185" href="#">

- Phil

Attached Files

Community Member, 6 Posts

1 August 2012 at 3:43am

Hey Phil,

try to replace:

<link rel="stylesheet" type="text/css" href="css/layout.css" />

<link rel="stylesheet" type="text/css" href="themes/YOURTEMPLATENAME/css/layout.css" />

You can also use this preferred method (HTML-Shortcut to layout.css will be automatically generated by SilverStripe when rendering the Page):

<% require themedCSS(layout) %>


Community Member, 107 Posts

6 August 2012 at 8:21am

I like to use $Themedir or $Themedir(SubTheme) as I like to have control over the location of my CSS & thier order so I do the following :
<link rel="stylesheet" type="text/css" href="$Themedir/css/layout.css" /> this way its more dynamic & allows you to just copy & rename your theme without having to re-link all CSS & JS files ;)