Ok, this has always bugged me and hopefully someone can chime in on this.
What is the purpose of the {total_results} variable when it loops the total results (or total count) for each result?
For example, if I do something like:
{exp:channel:entries channel="something" author_id="CURRENT_USER"}
{total_results}
{/exp:channel:entries}and If I have lets say 8 posts in channel ‘something’, It will output something like:
8
8
8
8
8
8
8
8
But If I limit the result to 1:
{exp:channel:entries channel="something" author_id="CURRENT_USER" limit="1"}
{total_results}
{/exp:channel:entries}It outputs:
1
Am I missing something here? :/ Why does it loop the total number of entries I have with the total number of entries I have, yet when I limit to 1 it totals it as 1?
So, the question then is, why does this even exist since it never does what we intrinsically want it to do? Why does it not just give me a single number with the total number of results for ‘something’ channel?