Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Redirect to 'admin/myModule'

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

Page: 1
Go to End
Author Topic: 924 Views
  • Edward Cutty
    Avatar
    Community Member
    4 Posts

    Redirect to 'admin/myModule' Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Redirect to 'admin/myModule' Link to this post

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

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

    Barry

  • Edward Cutty
    Avatar
    Community Member
    4 Posts

    Re: Redirect to 'admin/myModule' Link to this post

    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

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