- Issue created by @aiphes
- 🇮🇳India sumit-k
Trie to replicate this issue with some other field, but didn't get it.
IMO To resolve this issue, you can try the following:
Check the structure of content.field_telephone_lycee to ensure it is an array and contains the expected data. You can use kint() or var_dump() to inspect the content variable and ensure it has the correct structure.
If content.field_telephone_lycee is a render array, you should use the children function to access the child elements.
I think content.field_telephone_lycee itself is rendered directly without using an index.
- Status changed to Needs review
over 1 year ago 6:42am 6 July 2023 - 🇫🇷France aiphes
So, I don't have the good debug code I guess, because no information about the fields. Here is my code:
<ol> {% for key, value in _context %} <li>{{ key }}</li> {% endfor %} </ol> {{ dump(_context|keys) }} {{ dump(page) }} <h2> Debug des variables</h2> {{ vardumper() }}
- 🇫🇷France aiphes
Now the line change:
{% include directory ~ '/includes/regions_inc/inc_region_zone_3.html.twig' %}
and my include is :
{% if region_Zone_3 is not empty %} <div {{ noderegion_attribute.addClass(noderegion_classes,region3_classes).setAttribute('id', 'region-zone-3') }}> {{ region_Zone_3 }} </div> <!-- /#region-zone_3 --> {% endif %}
- Status changed to Postponed: needs info
2 months ago 11:08am 8 October 2024