Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By fatimadrupal8 on
Hello,
Please i have question , i want to display variables in twig file, i use dump and this is the result :
array (size=16) 0 => array (size=1) 0 => array (size=1) 'value' => string 'Emploi & Stage' (length=15) 1 => array (size=1) 0 => array (size=4) 'pid' => string '1' (length=1) 'source' => string '/taxonomy/term/6' (length=16) 'alias' => string '/home' (length=5) 'langcode' => string 'en' (length=2) ..........
But i dont know how to access to variable "alias" , i use but without result
{% for terms in terms_select %} {{ dump(terms) }} {{ terms['alias'] }}
{% endfor %}
Thank you in advance
Comments
Hi,
Hi,
Use this way, I think you find the result
or you can check with nested loop:
{% endfor %}
Thanks
HI dibyajyoti.mallick
HI dibyajyoti.mallick
Thank's for your reply, it works
Thank you again :)