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

Issues with subtemplate

Go to End

2 Posts   641 Views


Community Member, 2 Posts

23 August 2011 at 7:49am

I'm following the first tutorial, just trying to get familiar with how SilverStripe does things.

I've created the Layout directory, modified to point to it with $Layout in the proper place.

the within the Layout directory seems to work just fine, everything is included.

The within the Layout directory however only appears to display the HTML and $Content.

If I try to add as something as simple as:

<% if Level(2) %>
        this is a test!
<% end_if %>

It will display the HTML and whatever is in $Content, but nothing from within that if block when I attempt to browse to a page using the template.


Forum Moderator, 1203 Posts

28 August 2011 at 9:58pm


A bit of a late reply, but still:

- Did you do a ?flush=1 after adding the new template to activate it?
- Also I suppose the page you're browsing is part of a section consisting of at least a rootpage with some childpages?