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

20 Sep, 2024 11:53 AM
15 Jul, 2024 02:47 PM
01 Jun, 2024 10:54 PM
15 Nov, 2023 06:45 PM
21 Jun, 2023 05:22 PM

 

13 Jun, 2023 04:12 AM
17 May, 2023 10:00 AM
08 Mar, 2023 09:48 AM
15 Jan, 2023 04:45 PM
19 Sep, 2022 09:56 PM
04 Jul, 2022 08:54 PM