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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

what variables are available in the .ss templates?


Go to End


3 Posts   1967 Views

Avatar
Nicolaas

Forum Moderator, 224 Posts

7 September 2007 at 2:54pm

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" xml: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>

Avatar
Willr

Forum Moderator, 5523 Posts

7 September 2007 at 4:01pm

Avatar
Nicolaas

Forum Moderator, 224 Posts

8 September 2007 at 3:35pm

thanks a million - that is great!