0

I looked through the docs and wasn't able to find a count variable to see what file you are in using a field tag. For example, I want to detect when the first file is being looped though my custom field.

{custom_field} {if count == 0}foo{/if} bar {/custom_field}

1
  • Whilst there doesn't appear to be a count, the docs make reference to EE native count working, have you tried placing count in your tags ? – stuartmcd69 May 22 '13 at 6:57
5

The count variable is 1-indexed so you need to do {if count == 1}{/if} to get the first in a loop.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.