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

issue with redirect after email send function


Go to End


3 Posts   694 Views

Avatar
lozhowlett

Community Member, 151 Posts

11 October 2011 at 12:26am

Hi everyone

Director::redirect(Director::baseURL(). $this->URLSegment . "/?success=1");

org URL is: /england/south/test-hotel/

the redirected url is /test-hotel/

How do I get the full url instead of the segment? I think its a problem with $this->URLSegment

Thanks.

Avatar
martimiz

Forum Moderator, 1391 Posts

11 October 2011 at 2:49am

$this->URLSegment will only get you 'test-hotel', $this->Link() should get you '/england/south/test-hotel/', as in:

Director::redirect($this->Link() . '?success=1');

Avatar
lozhowlett

Community Member, 151 Posts

11 October 2011 at 2:54am

cool thanks.