Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » Need help with theme.

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

Page: 1
Go to End
Author Topic: 626 Views
  • tjille
    Community Member
    1 Post

    Need help with theme. Link to this post

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

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

    Link http://vimeo.com/34760038

    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 Page.ss

    <!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="http://www.webdesign.org">Web design</a> by <a title="Free Templates Online" href="http://www.freetemplatesonline.com">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
  • carlo
    Community Member
    5 Posts

    Re: Need help with theme. Link to this post

    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) %>

  • DesignerX.com.au
    Community Member
    107 Posts

    Re: Need help with theme. Link to this post

    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 ;)

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.