Reputation: 2265
I'm trying to use twig parameter I defined in config.yml:
twig:
globals:
my_path: "my_path"
in twig function asset() to concatenate "my_path" with the rest part of a path.
I tried:
src="{{ asset( my_path . 'the_rest_part_of_a_path') }}"
and even:
src="{{ asset( {{my_path}} . 'the_rest_part_of_a_path') }}"
Both are not working.
Is there any way I can use twig global parameter in that scenario?
Or maybe I can use symfony parameter defined in parameters.yml in such way?
Upvotes: 0
Views: 184