Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » what variables are available in the .ss templates?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1579 Views
  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    what variables are available in the .ss templates? Link to this post

    Hi

    Please have a look at my basic template below. Is there a place where I can see what variables are available for my templates (e.g. $MetaTags) as well as things like <% control Menu(2) %> or <% if Children %>. It would just be super useful to have a "cheat sheet" where I could look up the various options available.

    Cheers

    Nicolaas

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
    <head>
    <% base_tag %>
    $MetaTags
    <script src="$project/javascript/j.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="$project/css/typography.css" />
    <link rel="stylesheet" type="text/css" href="$project/css/layout.css" />
    <!--[if IE 6]><style type="text/css">@import url($project/css/ie6.css);</style><![endif]-->
    <!--[if IE 7]><style type="text/css">@import url($project/css/ie7.css);</style><![endif]-->
    </head>
    <body onload="resizeAll();">
    <div id="$pageCodeForCss">
    <div id="topLeft"></div>
    <div id="logo"><h1><a href="/">Winsborough Limited - Improving Performance</a></h1></div>
    <div id="topRight"></div>
    <div id="container">
    $Layout
    <div class="clear"></div>
    </div>
    <div id="footer">
    <% include menu3 %>
    </div>
    <div id="bottom"></div>
    </div>
    </body>
    </html>

  • Willr
    Avatar
    Forum Moderator
    5489 Posts
  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: what variables are available in the .ss templates? Link to this post

    thanks a million - that is great!

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