I have the following channel entry tag:
{exp:channel:entries channel="designs" orderby="title" sort="asc" limit="8" paginate="bottom" dynamic="no"}
{!--output--}
{paginate}
<div class="pagination clearfix">
<ul>
<li class="pagination-button">
{if previous_page}<a href="{auto_path}">{/if}
<i class="icon-angle-left"></i>
{if previous_page}</a>{/if}
</li>
<li><p>{current_page} of {total_pages}</p></li>
<li class="pagination-button">
{if next_page}<a href="{auto_path}">{/if}
<i class="icon-angle-right"></i>
{if next_page}</a>{/if}
</li>
</ul>
</div>
{/paginate}
{/exp:channel:entries}
Now that pagination displays the current and total pages, but instead I want it to show the current entries range and total entries, like this:
1 - 8 of 26 results
for page one
9 - 16 of 26 results
for page two
and so on.
I assembled this string:
{count} to {absolute_count} of {absolute_results} results
but I obviously can't just put it in the entry tag as it would parse for each entry. Moreover, {count} references the currently displayed items (ie. {count} will always be 1-8). I would have to do some sort of calculation to find the first count of the page. I assume an addon like Math would be suitable.
So to get the correct last count (ie. 8, 16, 24 etc.) the string should only be parsed on the final entry for a given page. What sort of condition could I use to ensure it only parses for the last entry?