Jump to:

3393 Posts in 976 Topics by 852 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: 538 Views
  • tjille
    Avatar
    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"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" type="text/css" href="css/layout.css" />
    $MetaTags
    <% base_tag %>
    </head>
    <body>
       <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 %>
             
                   </ul>
                   <div id="brading">
                   <h1><a href="AbsoluteBaseURL">$SiteConfig.Title</a></h1>
                   <h1 class="tagline">$SiteConfig.Tagline</h1>
                   </div>
          </div>
        <div id="content">
             <img src="images/title1.gif" alt="" width="271" height="41" /><br />
             <h2>$Title</h2>
             $Content
             $Form
             </div>
          </div>
          <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>

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

    - Phil

    Attached Files
  • carlo
    Avatar
    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" />


    by:

    <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
    Avatar
    Community Member
    107 Posts

    Re: Need help with theme. Link to this post

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

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