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.

Archive /

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

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

Template for specific page


Reply


2 Posts   1205 Views

Avatar
hairiemx

Community Member, 6 Posts

23 September 2008 at 12:27pm

How do i use different template for specific page? Is it possible?

Avatar
Liam

Community Member, 470 Posts

23 September 2008 at 2:38pm

Do you mean you have a certain page type created, but want to use a template only on one specific page, and not all the pages that use that page type?

Could use include .ss template files and if statement checks in your template, but that is messy.

I'd just create a special page type for that specific page and use the $Layout variable in your template.

That's what the Layout folder is for in your template directory. When you create a page type, say HomePage.php, by default SS will then look into your Layout folder for HomePage.ss and use that as the template, if none exists, it uses the standard page.ss

Read the tutorials as they explain more on this.