I am trying to print something in row 1 only
Putting this in re-write field OR global: custom text field
{% if counter == 1 %}
This should be printing in row 1
{% endif %}
Does not return/print anything.
If I do !=
it prints "This should be printing in row 1" in row 1 and row 2.
Strangely, when I use a template file. Ex: views-view-fields.html.twig
{% if fields.counter.content == 1 %}
This should be printing in row 1
{% endif %}
I get the opposite result. Using ==
prints "This should be printing in row 1" in row 1 and row 2
and when I use !=
nothing gets printed.
I also unchecked all the boxes that add extra divs/markup from the views UI and same result.
Active
9.5
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.