Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Update routing.rst#3573
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
Update routing.rst#3573
Uh oh!
There was an error while loading.Please reload this page.
Conversation
added 'true' parameter to "Absolute URLs" example.
Hmm, I'm a -1 on this change. Setting that argument to true isn't required for generating an absolute url, it only means the hostname will be included in the url. However, I don't think we have documented that. We may want to add a |
"By default, the router will generate relative URLs (e.g. /blog). To generate an absolute URL, simply pass true to the third argument of the generate() method" OK, I see the twig example actually doesn't use the generate method. |
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.
Hi guys! I've taken the advice here and opened up#3693. I hope it'll be more clear - I think it's definitely better :). Thanks! |
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
added 'true' parameter to "Absolute URLs" example.