8000 [Routing] Add support for anchor in url generation · Issue #3910 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Routing] Add support for anchor in url generation #3910

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

Closed
Koc opened this issue Apr 13, 2012 · 2 comments
Closed

[Routing] Add support for anchor in url generation #3910

Koc opened this issue Apr 13, 2012 · 2 comments

Comments

@Koc
Copy link
Contributor
Koc commented Apr 13, 2012

I an propose add _anchor or _fragment parameter to generate method, like in Magento http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/geturl_function_parameters

<?php

$router->generateUrl('topic.view', array('topic_id' => 1, '_anchor' => 'comment-2')); // '/topics/1#comment-2'
@fabpot
Copy link
Member
fabpot commented Apr 13, 2012

There is no need to that. Just append it after generating the URL:

$router->generateUrl('topic.view').'#comment-2';

@fabpot fabpot closed this as completed Apr 13, 2012
@Koc
Copy link
Contributor Author
Koc commented Apr 13, 2012

of course, this is just syntax shugar

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

No branches or pull requests

2 participants
0