I am trying to get the max results for the categories inside this channel entry. If the current category is the last one in the loop I don't want to add a , after the output.
{exp:channel:entries channel="ch_efn_gallery" entry_id="295"}
{categories}
{"{category_id}":"{category_name}"}
{if categories:count!=categories:total_results},{/if}
{/categories}
{/exp:channel:entries}
categories:count gives me the correct number. But categories:total_results doesn't work. And i din't find out how to get the max value for categories. Actually this template has much more output but i shortened it to the core of my problem.