I’m having problems with this =>
Originally the project search in the folder /app/templates/…
But the problem is this, we have to create a new folder (app/Provincia/templates/Thema) and use this folder for ours “distribution” (sorry, I don’t know how to call it)
The thing is
I need to make to Twig first search in Provincia/templates/Thema and if not found the template go to /app/templates/.
This is ours yaml >
twig:
default_path: '%kernel.project_dir%/templates'
globals:
_knockout_version : "knockout-3.3.0.debug.js"
rcdigital_asw_url : "%env(string:SERVIDOR_ASW)%"
rcdigital_app_env : "%env(string:APP_ENV)%"
twig_default_base : '%env(string:TWIG_BASE)%'
twig_base_top : '%env(string:TWIG_BASE_TOP)%'
twig_default_base_externo : '%env(string:TWIG_BASE_EXTERNO)%'
twig_theme_app_default_base : '%env(string:TWIG_THEME_APP_DEFAULT_BASE)%'
twig_default_boostrap_stg : '%env(string:TWIG_BOOSTRAP_STG)%'
twig_default_base_error : '%env(string:TWIG_BASE_ERROR)%'
twig_default_base_error_json : '%env(string:TWIG_BASE_ERROR_JSON)%'
when@test:
twig:
strict_variables: true
thanks for the help
According the docs you should use paths to have templates in more tham one place.
paths
type: array default: null
Defines the directories where application templates are stored in addition to the directory defined in the default_path option
# config/packages/twig.yaml
twig:
# ...
paths:
'email/default/templates': ~
'backend/templates': 'admin'
Hope it helps.