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.
Do we have attributes foreach for column names?
I would like to use display or not some columns based on parameters.
There is two approaches: to use filtering by parameters or by fields, but neither of one is working if they ar outside foreach. This is the case for column names.
f.ex.:
<th frx:if="{reg}">Region</th>
... foreach ...
<td frx:if="{reg}">{reg}</td>
In this case
Comments
Comment #2
metzlerd CreditAttribution: metzlerd commentedIf you change the first if to filter on */reg it should do what you want: frx:if="{*/reg}" on the if that is outside the foreach.
Comment #3
janeks CreditAttribution: janeks as a volunteer commentedThanks - it works!