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

Twig reference: Add links from routing functions to special routing parameters #6785

Conversation

alexislefebvre
Copy link
Contributor

The Twig reference doesn't explain what is the parameters parameter. I added a link to a section that explain the Special Routing Parameters.

.. note::

``parameters`` accept some special parameters. More information in
:ref:`special-routing-parameters`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you need to pass all required route parameters with this argument (not only "special" parameters) I would rather link to the routing guide itself (or maybe even better link to http://symfony.com/doc/current/templating.html#linking-to-pages).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabbuh I followed your last advice and then I realised that there is a link to the page you suggested just before the section I added. So I added a link to the Routing guide.

@alexislefebvre alexislefebvre force-pushed the twig-reference-add-links-to-special-routing-parameters branch 2 times, most recently from 0de29a8 to 3316026 Compare October 13, 2016 21:42
@@ -324,6 +324,10 @@ Returns the relative URL (without the scheme and host) for the given route.
If ``relative`` is enabled, it'll create a path relative to the current
path. More information in :ref:`templating-pages`.

.. note::

More information about routing in :ref:`routing`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this in an seealso block. And then I would also reword this a bit (please also not that you have to use the doc role):

.. seealso::

    Read :doc:`/routing` to learn more about the Routing component.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabbuh My wording was terrible, thanks for suggesting a better sentence! I followed your advice, the PR is updated.

@@ -1,3 +1,5 @@
.. _routing:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can then remove this label.

@alexislefebvre alexislefebvre force-pushed the twig-reference-add-links-to-special-routing-parameters branch from 3316026 to 682e6cc Compare October 14, 2016 13:31
@xabbuh
Copy link
Member

xabbuh commented Oct 14, 2016

👍 This looks perfect!

Status: Reviewed

@javiereguiluz
Copy link
Member

👍

@xabbuh
Copy link
Member

xabbuh commented Oct 14, 2016

Thank you @alexislefebvre.

xabbuh added a commit that referenced this pull request Oct 14, 2016
…al routing parameters (alexislefebvre)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #6785).

Discussion
----------

Twig reference: Add links from routing functions to special routing parameters

The Twig reference doesn't explain what is the `parameters` parameter. I added a link to a section that explain the *Special Routing Parameters*.

Commits
-------

b1b30d9 Twig reference: Add links from path() and url() functions to "Linking"
@xabbuh xabbuh closed this Oct 14, 2016
@alexislefebvre alexislefebvre deleted the twig-reference-add-links-to-special-routing-parameters branch October 14, 2016 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants