Add Category Count and Total Category Results to BW Category Count?

Ryan J. Bonnell's Avatar

Ryan J. Bonnell

23 Nov, 2011 05:13 PM

Would it be possible for BW Category Count to enable a {category_count} and {category_total_results} variables to the {exp:channel:entries} loop for use in the {categories} tag pair?

{exp:channel:entries channel="channel_name" dynamic="off"}
    <p>
        {title}
            {categories show_group = "1"}
                <!-- Show only the Last Category -->
                {if category_count == category_total_results}

                {category_name}
            {/if}
        {/categories}
    </p>
{/exp:channel:entries}

This would allow BW Category Count to be used to filter how many categories are output, based on the results returned.

Keep up the great work!

  1. Support Staff 1 Posted by Wouter Vervloet on 05 Feb, 2012 05:50 PM

    Wouter Vervloet's Avatar

    Hi Ryan,

    Sorry it took forever to respond, but as it turns out Tender has a spam-box and your message ended up in it. Never knew it existed until just now...

    Adding a {category_count} variable to the categories loop will cause a lot of confusion, since the main aim for this addon is to add a {category_count} tag that holds the number of categories this entry is assigned to.

    Using a different add-on for this would be beter, but I'm not sure if one exists.

    – Wouter

  2. Wouter Vervloet closed this discussion on 05 Feb, 2012 05:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

11 May, 2020 02:18 PM
16 Apr, 2020 06:39 AM
04 Apr, 2020 06:12 PM
30 Mar, 2020 07:50 PM
24 Mar, 2020 05:10 PM