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

Syling the Admin area


Go to End


3 Posts   1728 Views

Avatar
tuxibear

Community Member, 9 Posts

14 June 2016 at 8:30am

Edited: 14/06/2016 8:47am

Hello Everyone,

I might be missing something very obvious, but I can't seem to get a custom stylesheet to load in the admin section to be able to change the styles.

I do not want to change any of the layouts or anything, just want to change some colours to mimic the company colours.

I found this article: http://www.silverstripe.org/community/forums/customising-the-cms/show/11779

and have tried this in my _config.php

LeftAndMain::require_css('/themes/themfolder/css/admin.css');

I am using Silverstripe 3.3, if that helps

i have tried a few things (flushing, flushing cache) and can't seem to get it to load. Could someone please help me figure out where I have gone wrong?

Avatar
martimiz

Forum Moderator, 1391 Posts

5 July 2016 at 4:02am

if custom.css lives in themes/mytheme/css/ then the following in _config.php should load it:

LeftAndMain::require_themed_css('custom');

also:

LeftAndMain::require_css('themes/mytheme/css/custom.css');

(Note: whithout a starting slash)

Avatar
tuxibear

Community Member, 9 Posts

7 July 2016 at 3:08am

I did get this working, thank you for your help :)