Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » How to customise SilverStripe - Newbie??

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

Page: 1
Go to End
Author Topic: 390 Views
  • Nadz
    Community Member
    8 Posts

    How to customise SilverStripe - Newbie?? Link to this post

    I am new SS developer and user. The site i am working on has multiple design layouts of same page.
    For example, a homepage can be of 3 design layouts, one for a standard user, one for client and one for business user.
    Each layout has its 3 to 6 content boxes which are editable by editor, something like this http://www.checkoutapp.com/
    All content has to be editable by content authors who are not html savvy.

    I dont intend to develop multiple templates for single page.

    Can someone please let me know as what is the best approach of developing templates for this kind of site.
    Can i have a standard page, say Homepage, with cotent-editable widgets for each boxes??

    thanks in advance.

  • novaweb
    Community Member
    115 Posts

    Re: How to customise SilverStripe - Newbie?? Link to this post

    Hi Nads,

    Welcome to the SilverStripe community.

    This is not a complete answer, but will get you on the right track. It will be a little bit of a challenge if you are new to SilverStripe, but for someone familiar with it, it could be achieved in under a couple of hours.

    1) Create your different Security Groups, in the Security section of your site (Standard, Client, Business) - add appropriate members.
    2) Create your main CSS stylesheet in themes/mytheme/css/layout.css - This should hold the div styling, the structure for your page, but no colours or "Group Specific" css.
    3) Create your "Group Specific" css files in themes/mytheme/css/ (standardUser.css, clientUser.css, businessUser.css)

    I'll assume from here on you want this to be applied to every page type, so we will use Page.php

    4) Do this in Page.php Page_Controller class, right at the top: (haven't tested code, but you should understand the logic)

    function init() {
       // This part switches the CSS based on the logged in user
       if(Member::CurrentUser()->InGroup('Standard')) {
       } elseif(Member::CurrentUser()->InGroup('Client')) {
       } elseif(Member::CurrentUser()->InGroup('Business')) {


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.