0

Does Expression Engine entries loop have a variable to show which index you're on for each iteration? I found the {count} and {total_results} in the docs, but cant seem to find the variable that spits out the index of the iteration. Does EE even have one?

I know I could do this by turning on PHP and using PHP to give me the index number, but i'm trying to avoid using PHP.

1
  • 2
    This might be a better question to ask at: expressionengine.stackexchange.com? Information hovering the expressionengine tag seems to suggest. Commented Dec 20, 2024 at 23:54

2 Answers 2

0

I think you are looking for {absolute_count}

Sign up to request clarification or add additional context in comments.

1 Comment

I know about {absolute_count}, but thats not what I was looking for. For example if you have 3 entries and you run a channel entries loop, I'd like to get the current iteration number (Ie.: 0, 1, 2).
0

To get the index number you can use {absolute_index}.
https://docs.expressionengine.com/latest/channels/entries.html#absolute_index

2 Comments

Please see this meta post, and give more information in your answer than redirecting somewhere else.
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.