user3531149
user3531149

Reputation: 1539

What's the difference between the include tag and the include function?

I saw someone including a template on his application using the twig template system. He included his template like this:

{{ include( 'Bundlename:Directory:template.html.twig' ) }}

instead of this:

{% include 'Bundlename:Directory:template.html.twig' %} 

At first I thought he was using a custom twig extension, but it actually works on symfony in general, even though its not documented.

http://twig.sensiolabs.org/doc/tags/include.html

So is there a difference between the two? why is it not documented? if the syntax is wrong why is it even working?

Upvotes: 2

Views: 288

Answers (1)

Related Questions