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.

General Questions /

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

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

Redirect to 'admin/myModule'


Reply


3 Posts   1010 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, 1799 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