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.

Archive /

Our old forums are still available as a read-only archive.

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

Problems with the CMS backend, when developing a new theme


Go to End


6 Posts   1610 Views

Avatar
CriaturaCreativaStudio

Community Member, 73 Posts

17 August 2008 at 12:28pm

Hello there!

Mi name is Eduardo Cesario, you may know me by my Organica Creativa design on Zen Garden.

I'm developing a very basic site, my first one using the cms. Everything it's going quite well.
I'm runing MAMP on a Macbook Pro.

When i've updated the files to let the CMS know wich theme use (in my case, called "redjeans"), the previews looks ok, but the problem ocurrs when i want to log in agian on the cms to continue adding contents into it.
The backend uses also my new theme! i want to mantain the original theme for the backend, mainly because when the final client use the site, it will be a mess if it doenst display correctly.

i've edited two files as follows:

mysite/_config.php

SSViewer::set_theme('redjeans');

mysite/code/Page.php

Requirements::themedCSS("never_styles");

and deleted the 3 original lines (wich are the blackcandy files). I dont know how to manage this, it's weird that i've lost all the original theme for the backend.... maybe i'm doing something wrong, so i ended up here, becuse im tired to reconfigure the 2 files each time i want to swicth to the backoffice.

(for you to know, yes, i refreshed the urls using flush=1)

hope someone could help me

best regards and thanks!

Eduardo

Avatar
Willr

Forum Moderator, 5523 Posts

17 August 2008 at 12:36pm

Its strange that the backend is including your CSS. Is that Requirements::themedCSS() in the function init() in the Page_Controller class?.

Normally the CMS can be styled from your theme but using a file called editor.css and typography.css - maybe create those 2 files - leave them blank but see if the cms is still playing up

Avatar
CriaturaCreativaStudio

Community Member, 73 Posts

18 August 2008 at 6:54am

hello willr....thanks for your answer...

seems like i dont understand the cms structure at all... i alternativelly have or my "redjeans" theme for all the site (live site and cms), or the blackcandy for both parts...

Anything i'm doing is wrong.

I don't understand how the backend manages the blackcandy style, since i'm specifying the new style on the config file... i alternatively have one visualization or the other.. never the two as i'm specting...

i have this line on mysite/_config.php

SSViewer::set_theme('redjeans');

on mysite/code/Page.php

.....
class Page_Controller extends ContentController {
function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("editor");

Requirements::themedCSS("never_styles");
}
.....

As it is, now im seeing my theme both in the site and the backend...

I'm tried referencing only my new styles, and it dindt work too, so last configuration ive tried is reference all the 4 stylesheets.

Hope you can help me wiht this issue, it's driving me mad

Regards

Eduardo

Avatar
Willr

Forum Moderator, 5523 Posts

18 August 2008 at 1:18pm

Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("editor");
Requirements::themedCSS("never_styles");

Have you got a layout.css , typography.css and editor.css in the yourtheme/css/. If you aren't using them then you dont need to include them. But if they are not there then it shouldnt use your css file thats just odd!.

What is changing in the backend? is it just the font sizes or color.

You could try copy all your styles from never_styles to layout.css and then see if it effects the backend.

Avatar
CriaturaCreativaStudio

Community Member, 73 Posts

26 August 2008 at 5:19pm

Edited: 26/08/2008 5:21pm

Wilr,

I've noticed that once logged in, things look good, i mean, with blackcandy theme...

I've managed this issue remaining logged in (and using the "remember password" feature), so i log directly to the cms every time i visit the /admin url.

So i Alternatively edit the config.... file, for the theme to display. It's a very basic workaround, but it helped me to develop almost the complete site.

Anyway, i would love to know how to fix this issue... maybe i re-styled some class that uses the cms itself...

Regards

Eduardo

Avatar
Willr

Forum Moderator, 5523 Posts

26 August 2008 at 5:27pm

maybe i re-styled some class that uses the cms itself...

The CMS will include 2 files from your theme - typography.css and editor.css if you have those 2 files and any styles in them then yes that would effect your CMS.