Jump to:

1016 Posts in 567 Topics by 309 members

Forum Module

SilverStripe Forums » Forum Module » Probably a silly question

Discuss the Forum Module.

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

Page: 1
Go to End
Author Topic: 535 Views
  • martbarr
    Avatar
    Community Member
    41 Posts

    Probably a silly question Link to this post

    ... 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

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Probably a silly question Link to this post

    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.

    535 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.