How do i use different template for specific page? Is it possible?
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.
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.