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.

Forum Module /

Discuss the Forum Module.

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

Probably a silly question


Go to End


2 Posts   1183 Views

Avatar
martbarr

Community Member, 59 Posts

26 July 2010 at 8:46am

... but how can I make forum be based on a different template than page.ss ????
I've tried making the forum code exend my FullPage model,
but it's not the model, I need to inherit the view, and not cracked it yet

Sorry - am an old style C programmer and this inheritance lark is all way too modern LOL

Thanks
Martin

Avatar
Willr

Forum Moderator, 5523 Posts

26 July 2010 at 11:30am

Templates are loading by hierarchy. The Forum template is nested inside Page.ss because it is in the layout folder. If you create a Forum.ss template in /themes/yourtheme/template/ (rather than layout) then it will use this rather than your Page.ss. But note you would have to create 3 page templates at the top level - Forum.ss, ForumHolder.ss and ForumMemberProfile.ss if you wanted full theme coverage.

The other option is to directly edit the Forum PHP code so that it extends your FullPage class rather than Page which is a bit hacky but easy.

Ideally you wouldn't have page types which simply control things like layout, design and instead have checkboxes or modes on the default Page.php which trigger design / layout functionality.