php - Using a Twig variable inside the 'use' tag -



php - Using a Twig variable inside the 'use' tag -

i want dynamically utilize twig template, reason can't work.

when add together line, page crashes:

{% utilize current_page %}

current_page set "birthday.twig", exists.

as twig documentation states:

because utilize statements resolved independently of context passed template, template reference cannot expression.

so unfortunately not possible have variable {% utilize xyz %} statement.

however, can include using variable. see http://twig.sensiolabs.org/doc/recipes.html

php twig

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -