Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Tweak to Absolute URL generation#3693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This is so we have the controller/PHP version and template version in the same spot. See#3573I also made a few other tweaks, including using generateUrl (like we did earlier) to generatethe absolute URL, not going through the router service directly.
a controller, simply pass ``true`` to the third argument of the ``generateUrl()`` | ||
method:: | ||
$this->getgenerateUrl('blog_show', array('slug' => 'my-blog-post'), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Remove theget
fromgetgenerateUrl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
hmm, are you sure? Just kidding - thanks for catching that ;)
👍 |
Thanks for the sanity check as always@xabbuh :) |
This PR was merged into the 2.3 branch.Discussion----------Tweak to Absolute URL generation| Q | A ||----------------|------|| Doc fix | yes || New docs | no || Applies to | 2.3 || Fixed tickets |#3573 |This updates how we describe URL generation. After#3573, it occurs to me that if you're looking here for a reference, you'll look for the first spot where absolute URLs are discussed and try to use it. So why not put the controller/PHP version and template version of doing this in the same spot.Cheers!Commits-------007a54f Fixing typo thanks to@xabbuh873706c Moved the section about generating absolute URLs down
This updates how we describe URL generation. After#3573, it occurs to me that if you're looking here for a reference, you'll look for the first spot where absolute URLs are discussed and try to use it. So why not put the controller/PHP version and template version of doing this in the same spot.
Cheers!