Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Admin used by provider

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

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

Page: 1
Go to End
Author Topic: 2295 Views
  • Admin used by provider Link to this post

    Hey,

    I have a problem with the admin-section of SilverStripe.
    My provider uses "http://www.wv-logic.be/admin/" for the administration of the account.
    So, if I want to navigate to the admin-section of Silverstripe, I get forwarded to my accountadministration.

    So, I was wondering if the "admin" could be renamed to something else, like "cms" for SilverStripe. I already looked through the code, but it's quite huge, so I better ask here on the forum.

    Thanks already.

  • HakTom1
    Avatar
    Community Member
    2 Posts

    Re: Admin used by provider Link to this post

    hi!

    i have the same problem here, and it would be great if somebody could tell us, what we could do in this case.

    thank you!

  • HakTom1
    Avatar
    Community Member
    2 Posts

    Re: Admin used by provider Link to this post

    i found it out myself.

    -) edit your site´s _config.php and add the following:
    Director::addRules(10, array(
    'cms' => 'CMSMain',
    ));

    you should use 'cms' or 'silverstripe', couse these are redirected to 'admin' in the CMS (see /cms/_config.php)

    -) open /cms/code/CMSMain.php and find the function 'Link'. Change 'admin' to 'cms':
    public function Link($action = null) {
    return "cms/$action";
    }

    -) open /cms/code/LeftAndMain.php and find in the function 'MainMenu' :
    _t('LeftAndMain.SITECONTENT',"Site Content",PR_HIGH,"Menu title") => array("content", "admin/", "CMSMain"),

    change it to

    _t('LeftAndMain.SITECONTENT',"Site Content",PR_HIGH,"Menu title") => array("content", "cms/", "CMSMain"),

    now you are able to log in via yourdomain.com/cms, you can use the main menu and you can save stuff.

    Maybe the Silverstripe Developers will implement a configurable Admin Url in the future?

  • Starman
    Avatar
    Community Member
    2 Posts

    Re: Admin used by provider Link to this post

    HakTom - you've hak'd my Christmas - many thanks. The other option I had already found was just to go to /CMSMain/ in the URL.

    I am about to "upgrade" to 2.2.1 so I'll let you know if I have to repeat the hack.

    2295 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.