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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Layout Template Selection


Go to End


1396 Views

Avatar
StuM

Community Member, 59 Posts

4 March 2011 at 5:05pm

Edited: 04/03/2011 5:06pm

Hi All,

I have a site that uses 2 themes, one for desktop and one for mobile. I'm in the early stages so are currently just using Blackcandy for both.

I have a page class called a ProductPage. I want a common layout loaded for this that both themes can use, so I don't want to duplicate that template. So I have the following structure which I thought would work:

1. in mysite/_config.php => project = 'mysite'
2. sub-template => mysite/templates/Layout/ProductPage.ss

I assumed(and I'm sure I've done it before) that it would look in this order:

1. /themes/blackcandy/Layout/ProductPage.ss
2. /mysite/templates/Layout/ProductPage.ss
3. /themes/blackcandy/Layout/Page.ss

as it is, it displays #3, #1 isn't there and it doesn't seem to be able to find #2.

Is there a way I can achieve this?