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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Changing admin theme


Go to End


2 Posts   1502 Views

Avatar
RossM

Community Member, 2 Posts

20 October 2010 at 11:33pm

Hi, I want to override a core admin template (WidgetAreaEditor.ss), but I am not sure how to go about it. I am setting my theme in _config.php, but I notice that in LeftAndMain.php's init() method, the following happens:

// The user's theme shouldn't affect the CMS, if, for example, they have replaced
// TableListField.ss or Form.ss.
SSViewer::set_theme(null);

This seems to make it difficult to set the admin theme, I have tried using an Extension to LeftAndMain, but its init() method is called before that of LeftAndMain, meaning I can't set the theme here.

Has anyone else managed to change/override the admin theme successfully?

Thanks,

Ross

Avatar
Martijn

Community Member, 271 Posts

21 October 2010 at 7:20am

You can create a copy of WidgetAreaEditor.ss in mysite/templates. SS will use that template instead..