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.

Themes /

Discuss SilverStripe Themes.

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

Issue regarding the admin panel


Reply


6 Posts   1067 Views

Avatar
duskydesigns

Community Member, 15 Posts

13 January 2011 at 8:24am

Hi all,

I have just discovered Silverstripe and i love the CMS in favor to ModX. I have a problem though wich i need to fix but am unsure how. All the content is made up in XML so it can be used in Flash. However because of this, i am unable to log in in the admin side because it uses the same theme. How do i change the admin theme or isn't there a way to change it?

Greets,

Kenneth

Avatar
apiening

Community Member, 60 Posts

13 January 2011 at 11:52am

hi kenneth,

the cms/admin shouldn't be affected by changes to the theme a great deal and should remain accessible. can you describe the approach you took to switch to xml?

cheers

andy

Avatar
duskydesigns

Community Member, 15 Posts

13 January 2011 at 12:19pm

Edited: 13/01/2011 12:20pm

Thanks for the quick reply!

Well i copied the default theme, blackcandy and changed the Page.ss and map Layout > Page.ss. Also changed the map name to "xml", as that was the theme. The extension i added "blog" is hard themed, meaning that i changed the template files to reflect the theme (blog didn't have theme files so had to do it this way)

This could be miscommunication, the actual back-end of the admin is fine (/admin). The part that lets you log in, the input fields and such get screwed up because i changed it all to xml. So basically as long as i am logged in its okay but as soon as i have to log in it gets impossible due to the fact that the default them is now xml output wich doesn't give me fields or a way to log in to the admin part.

Basically what i need is for the log in part of the theme to be "normal", i don't really know how to do this (maybe could be changed in the pagecontroller?).

Hope you can help! Thanks for reading.

Greets,

Kenneth

Avatar
apiening

Community Member, 60 Posts

13 January 2011 at 12:48pm

first idea that springs to mind is a switch in the mysite/_config.php a la http://localhost/silverstripe/Security/login?output=html:

if(isset($_GET['output']) && $_GET['output'] == 'html') {
SSViewer::set_theme('blackcandyhtml');
} else {
SSViewer::set_theme('blackcandy');
}

(untested)

btw: you can override templates in blog/templates by just creating files with the same name in the themes/blackcandy/templates folder. this way when you update blog you don't override your custom templates (don't forget to ?flush=all ;)

Avatar
martimiz

Forum Moderator, 1107 Posts

13 January 2011 at 11:19pm

Edited: 13/01/2011 11:20pm

I've no idea if this will actually work, but maybe in _config.php: Security::template_main = 'PageHTML'; and then define a PageHTML.ss as your HTML version of the template?

Avatar
duskydesigns

Community Member, 15 Posts

28 January 2011 at 12:36am

Update on the fix, the output thingy didnt work but the pageHTML worked great

just added

Security::$template_main = 'PageHTML';

to mysite/_config.php

and after that it was just updating layout with a pageHTML and a general pageHTML.ss

thanks for the help guys!