Jump to:

1379 Posts in 490 Topics by 520 members

Themes

SilverStripe Forums » Themes » One page with a different setup.

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 1326 Views
  • solar
    Avatar
    10 Posts

    One page with a different setup. Link to this post

    Hey guys I must say I have been looking around at different CMS's and SS seems so clean well rounded. My only dislike would be lack of documentation. I hope to change that by writing some tutorials in the future. And how...I have set up my blackCandy theme and was wondering how can i get the About page to follow a totally different layout. Example- I click the about button and i'm taking to the about page with a different layout thats not following the "page.ss" file but my own custom theme like "blabla.ss" then when I click on home it will once again follow the "page.ss" file. I know this was covered in tutorial 1 but a few things seemed to have changed like the "change to home page" selection is missing. Thank you for reading and helping if you can.

    www.deyons.com

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: One page with a different setup. Link to this post

    Hi Solar

    I think I get what your saying, basically you want to have the whole page template to be different for a given page type, rather than just the layout?

    If this is the case its easy. Say you have your AboutPage.php page class then SS will first look in the 'templates' folder (either in mysite or your theme) then if it doesnt find anything it will take the Page.ss and use that and then when it comes accross $Layout it will then look in the Layout folder for AboutPage.ss which it will insert in to this part of Page.ss

    So if you just want a whole template for AboutPage.ss all you have to do is place it into the templates folder. So you would have a file structure like this:

    templates/
    -----Includes/
    -----Layout/
    Page.ss
    AboutPage.ss

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