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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Redirect to 'admin/myModule'


Go to End


3 Posts   1643 Views

Avatar
Edward Cutty

Community Member, 4 Posts

27 May 2010 at 9:38pm

Hi all, got a problem with redirect in admin section.

When an user is logged, i want to redirect him to the page of the module i've created (example: /admin/myModule).

I've tried to do this in LeftAndMain using Director::redirect($Url_base. 'myModule'), but it doesn't work.

Any suggestions?

Thanks in advance

ed

Avatar
swaiba

Forum Moderator, 1899 Posts

28 May 2010 at 3:59am

Edited: 28/05/2010 4:00am

I've used this in _config.php...

Security::set_default_login_dest('admin/myModule');

Barry

Avatar
Edward Cutty

Community Member, 4 Posts

28 May 2010 at 7:28pm

Edited: 28/05/2010 7:34pm

Thanks so much Barry, but it doesn't work for me. I've also tried to set the $default_login_dest in Security.php, but it always redirects me to admin/.

I solved changing (in LeftAndMain) this line

return Director::redirect($candidate->Link);

to

return Director::redirect('admin/myModule');

Bye