Open Nielio opened 6 years ago
Asume you have a file foo.twig
<div class="sg-cw-col-xs-12"> {% block product_info_1 %} <label>Some stuff</label> {% endblock %} </div>
In file bar.twig you want just to output the block product_info_1
product_info_1
<div class="sg-cw-col-xs-6"> {{ block('product_info_1', 'foo.twig') }} </div>
Nothing will be outputed. Trying {{ block('product_info_1', 'foo.twig') is defined }} also returns false.
{{ block('product_info_1', 'foo.twig') is defined }}
false
It seems the second argument is ignored.
Nice catch, twig.js doesn't support passing a custom template to the block() function.
block()
For reference, it was introduced to Twig in https://github.com/twigphp/Twig/pull/2245
Asume you have a file foo.twig
In file bar.twig you want just to output the block
product_info_1
Nothing will be outputed. Trying
{{ block('product_info_1', 'foo.twig') is defined }}
also returnsfalse
.It seems the second argument is ignored.