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

Layout-Template overwrites whole page


Go to End


1106 Views

Avatar
FlorianH

Community Member, 33 Posts

5 August 2008 at 12:09am

Edited: 05/08/2008 12:12am

Hello SilverStripe Community,

I've got a problem with including a Layout-Template using the $Layout Tag. Actually it works well with any other Page (or PageType) I got, so it's hard to explain what the problem really is. What I did is, I wrote a standard Template calles "Page.ss" which has the $Layout Tag in there (plus a Header and a Footer) and I wrote another Template (in the Layout/ Subfolder) which just lists some DataObjects. Anyway, when I open the Page in my browser it just shows me the Layout subtemplate without the surrounding Layout out of the standard "Page.ss". I don't really get that since Silverstripe should include the Layout Page not until the rest of the Main-Template is written (or at least the stuff before the $Layout Tag, which is the Header for example in this case). I hope you understand what I'm trying to explain and are able to help me. Thanks in advance

Florian H.