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.

Customising the CMS /

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

Customize backend style and UI


Go to End


14 Posts   10436 Views

Avatar
jorrie

Community Member, 40 Posts

29 March 2010 at 1:36am

Whats the best way to modify the backend UI a little bit?
Ive red saphire framework let you change things but I wonder If I would like to change the TAB styling for example how to do that.

Are there backend themes? To skin the backend?

Avatar
Willr

Forum Moderator, 5523 Posts

29 March 2010 at 8:17pm

You can define a editor.css in your theme which is included in the backend. You could probably use this as a crude way of getting in and overriding css / images in the backend.

If you want to customize templates or do anything more drastic then your need to make a themes/yourtheme_cms/ folder and in that you should be able to override the css, templates.

Avatar
jorrie

Community Member, 40 Posts

29 March 2010 at 8:33pm


Thanks Willr

So I create a /themes/myname_cms/ and copy all /images/ /css /templates from /cms/* inside that?

Avatar
Willr

Forum Moderator, 5523 Posts

29 March 2010 at 8:40pm

Hmm just tried this myself and it looks like the path to the css files are hardcoded, I thought the links should have been themedCSS but appears not. You can try doing that. If you don't have any luck use the editor.css to override it.

Avatar
Wilson

Community Member, 63 Posts

30 March 2010 at 3:24pm

Hey Willr,

I'm not having any luck with this with 2.4 beta1. Is there any other way to set some custom CSS in the admin side? I need to apply 2-3 classes so nothing huge, but editor.css doesn't seem to get loaded in scope. For example,

body.CMSMain {
background: aqua;
}

doesn't show anything.

Thanks,
Wilson

Avatar
jorrie

Community Member, 40 Posts

30 March 2010 at 10:43pm

Can the dev team make this non hardcoded and a setting in the config files?
So we can easily override this?

Avatar
Willr

Forum Moderator, 5523 Posts

31 March 2010 at 9:17am

jorrie just had a look through the code and changing the css links to the themedCSS won't work since it'll include your themes main files but I have stumbled across another way to do it. LeftAndMain::init() has a extend() call (at least in 2.4) so you can override with a custom LeftAndMain extension.


// mysite/code/MyCustomLeft.php
<?php

class MyCustomLeft extends Extension {
	
	public function init() {
		Requirements::themedCSS('admin');
	}
}

Then add the extension in your _config

// add to the mysite/_config.php
Object::add_extension('LeftAndMain', 'MyCustomLeft');

Will load an admin.css file from your theme.

Avatar
Wilson

Community Member, 63 Posts

31 March 2010 at 9:20am

Wow! Thanks Willr. I really appreciate that. I'm using 2.4, so this will be really valuable. Thx!!

Go to Top