Jump to:

1369 Posts in 487 Topics by 520 members

Themes

SilverStripe Forums » Themes » Issue regarding the admin panel

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 994 Views
  • duskydesigns
    Avatar
    Community Member
    15 Posts

    Issue regarding the admin panel Link to this post

    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

  • apiening
    Avatar
    Community Member
    55 Posts

    Re: Issue regarding the admin panel Link to this post

    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

  • duskydesigns
    Avatar
    Community Member
    15 Posts

    Re: Issue regarding the admin panel Link to this post

    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

  • apiening
    Avatar
    Community Member
    55 Posts

    Re: Issue regarding the admin panel Link to this post

    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 ;)

  • martimiz
    Avatar
    Forum Moderator
    1067 Posts

    Re: Issue regarding the admin panel Link to this post

    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?

  • duskydesigns
    Avatar
    Community Member
    15 Posts

    Re: Issue regarding the admin panel Link to this post

    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!

    994 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.