Answer the question
In order to leave comments, you need to log in
How to install counters "Yandex metrics, etc." only on YII_ENV_PROD using twig template engine?
As far as I know, it is necessary to manipulate the YII_ENV_PROD variables for working on prod and YII_ENV_DEV for local development
. Apparently, it is necessary to use the YII_ENV_PROD variable in the twig template
{% if (YII_ENV_PROD) %}
// counter codes here
{% endif %}
But this design does not work , please tell me what is needed in order to be able to do checks with these constants.
Answer the question
In order to leave comments, you need to log in
Have you looked at twig.sensiolabs.org/doc/functions/constant.html
?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question