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

issue with redirect after email send function


Reply


3 Posts   411 Views

Avatar
lozhowlett

Community Member, 146 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, 1106 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, 146 Posts

11 October 2011 at 2:54am

cool thanks.