1

Is there a simple way to show all entries for a channel, and the current entry 'position' from the count without using Pagination (don't want to affect URLS).

So the first entry from three entries for a channel would show:

1 of 3

Last entry from same set of entries:

3 of 3

I've looked at count, absolute count, total_results and absolute_results but can't find a simple solution... Any guidance would be appreciated. I'm sure I'm missing something easy here.

Ta, Liam

2
  • Will you always be doing this on a single URL that lists all entries? Or are you seeking to do this for all entries within a screen that only displays a subset of those entries? – Mark J. Reeves Feb 4 '13 at 19:16
  • Thanks for the reply - it's on a single entry page, not a list. – liamcrean Feb 4 '13 at 19:22
3

Ha. That awkward moment when you find the answer to your exact same question answered by yourself a year previously...

http://ellislab.com/forums/viewthread/220271/#1016285

Is there an easy way to pull and entries count in so it might display on a single entry page like

Product 5 / 40 Where the channel contains 40 products and this is the 5th product in the channel (when sorted by date/name/custom field etc etc).

{exp:channel:entries channel="channel" orderby="title" sort="asc" dynamic="no"}
  {if segment_x == url_title}{count} / {total_results}{/if}
{/exp:channel:entries} 

Shame the redirects for old forum posts aren't quite correct as this wasn't showing in Google, had to do some canny searching to dig it up...

Thanks for the replies all the same chaps.

2
  • 1
    This is the same thing I was working toward in my answer. You have to output all the entries, and check for the entry that matches the filter, instead of filtering or limiting the tag's output. – Mark J. Reeves Feb 4 '13 at 19:37
  • Yeah, thanks Alex. It was one of those "I'm sure I have the snippet somewhere, too tired to remember moments..." time for a cuppa. Cheers, Liam. – liamcrean Feb 4 '13 at 19:55

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.