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 /

Issues with subtemplate


Reply


2 Posts   517 Views

Avatar
fireballmatt

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 Page.ss to point to it with $Layout in the proper place.

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

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

Avatar
martimiz

Forum Moderator, 1105 Posts

28 August 2011 at 9:58pm

Hi

A bit of a late reply, but still:

- Did you do a ?flush=1 after adding the new Page.ss 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?