Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Re-skining the CMS

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

Page: 1
Go to End
Author Topic: 1034 Views
  • Mo
    Avatar
    Community Member
    508 Posts

    Re-skining the CMS Link to this post

    Quick question. I know that there is a way of customising the CMS' appearance. I also know there is a forum post and a Wiki page about this, but I have been completely unable to find either.

    Could anyone point me to these?

    Cheers,

    Mo

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Re-skining the CMS Link to this post

    Hi Mo

    Great work on the dashboard module, I look forward to using it on my next project

    here is the doc's page you are looking for: http://doc.silverstripe.com/doku.php?id=recipes:rebranding-the-cms

    It's not particularly extensive though.

    I recently did a pretty extensive CSS rejig of the CMS by decorating LeftandMian with a new CSS requirement. That way you can do it from a module rather than having to edit the core files.

    So I had a file called UIDecorator.php and it contained:

    class UIDecorator extends LeftAndMainDecorator {

       function init() {

          Requirements::CSS("lite_UI/css/lite_ui.css");
          
       }

    }

    then in the config file I added:

    Object::add_extension('LeftAndMain', 'UIDecorator');

    That then let me override all of the styles in cms/css

    You could also add your JS files requirements in there for some jquery modal window stuff as per your other post.

    Hope that helps

    Aram

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Re-skining the CMS Link to this post

    Oh cool, thanks Aram. This will be really helpful.

    Quick question though, I thought classes that are used via Object::add_extension() had to extend the Extension class?

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Re-skining the CMS Link to this post

    hmm, not sure I entirely follow :s

    The LeftAndMainDecorator class is an inbuilt class specially for extending LeftAndMain in this way......I don't really know much more than that

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Re-skining the CMS Link to this post

    Oh right, I image that is fine then. I just know I got an error the other day, I think i was doing something like:

    class someclass extends ContentControler {
    ...
    }

    The error told me it should be:

    class someclass extends Extension {
    ...
    }

    But that was probably just in that instance, so never mind

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