Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Use the Twig namespaced syntax for all templates #8120

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

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

javiereguiluz
Copy link
Member

This fixes #7003.


With namespaced paths, the following works as well:
Usually, when you refer to a template, you'll use the Twig namespaced paths, which
are automatically registered for your bundles:

.. code-block:: twig

{% extends "@App/layout.html.twig" %}
{{ include('@App/Foo/bar.html.twig') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we use tis:

- {{ include('@App/Foo/bar.html.twig') }}
+ {% include '@App/Foo/bar.html.twig' %}

or is the current one the recommended?

Copy link
Member

Choose a reason for hiding this comment

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

I think we always use the function instead of the tag.

@xabbuh
Copy link
Member

xabbuh commented Jul 7, 2017

Thank you Javier.

@xabbuh xabbuh merged commit 858dd81 into symfony:2.7 Jul 7, 2017
xabbuh added a commit that referenced this pull request Jul 7, 2017
…guiluz)

This PR was merged into the 2.7 branch.

Discussion
----------

Use the Twig namespaced syntax for all templates

This fixes #7003.

Commits
-------

858dd81 Use the Twig namespaced syntax for all templates
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.