Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update routing.rst #3573

Closed
wants to merge 1 commit into from
Closed

Update routing.rst #3573

wants to merge 1 commit into from

Conversation

ORiON-
Copy link

@ORiON- ORiON- commented Feb 12, 2014

added 'true' parameter to "Absolute URLs" example.

added 'true' parameter to "Absolute URLs" example.
@wouterj
Copy link
Member

wouterj commented Feb 12, 2014

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 .. tip:: block documenting this feature. Can you update this PR, or should I submit that change?

@ORiON-
Copy link
Author

ORiON- commented Feb 12, 2014

"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.
I'm guessing I'm not the only one confused. Maybe It'll be a good idea to clarify that case.

weaverryan added a commit that referenced this pull request Mar 18, 2014
This is so we have the controller/PHP version and template version in the same spot. See #3573

I also made a few other tweaks, including using generateUrl (like we did earlier) to generate
the absolute URL, not going through the router service directly.
@weaverryan
Copy link
Member

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!

@weaverryan weaverryan closed this Mar 18, 2014
weaverryan added a commit that referenced this pull request Mar 19, 2014
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 @xabbuh
873706c Moved the section about generating absolute URLs down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants