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.

Archive /

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

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

Admin used by provider


Reply


4 Posts   2360 Views

Avatar
James P Sullivan

1 Post

3 November 2007 at 3:14am

Edited: 03/11/2007 3:19am

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.

Avatar
HakTom1

Community Member, 2 Posts

19 December 2007 at 6:09am

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!

Avatar
HakTom1

Community Member, 2 Posts

20 December 2007 at 1:26am

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?

Avatar
Starman

Community Member, 2 Posts

23 December 2007 at 3:19am

Edited: 23/12/2007 3:24am

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.