Unable to compare view count

Created on 8 May 2021, almost 4 years ago
Updated 18 January 2025, 3 months ago

I am working on Drupal 9. I have some code in View and overridden a field's output. Global counter value is displaying properly but unable to compare or check counter value in view. I need to show a class if counter value is 1 then used code {% if counter == 1 %} class here {% endif %}. But this is returning false always. Please suggest.

{{ counter }} is returning correct value always

{% if counter > 1 %} show class {% endif %} is returning false

{% if counter == 1 %}show class{% endif %} is returning false

🐛 Bug report
Status

Closed: cannot reproduce

Component

Code

Created by

🇮🇳India bhanojeerao Hyderabad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024