1

I’m using a plugin name « Category Count » to count the number of entries in a specific category.

When i create an entry, transcribe create one for French and one for English so my counter show me two entries. I need only one entry count.

Here’s my code :

{exp:channel:categories category_id="8" style="linear"}
  {if soin-visage-section == 'Catégorie' }
    <li><a href="{exp:transcribe:uri path="soin-visage/par-categorie/list/{category_url_title}"}">{category_name} ({exp:catcount cat_id="{category_id}" channel="products"})</a></li>
 {/if}
{/exp:channel:categories}

Someone Can help me with this ?

Thank you very much.

Kind regards

Jérôme

1

1 Answer 1

1

It's possible Transcribe and Category Count aren't very sympatico. How about just running a query with the Query module? This is completely untested as I'm quite busy but I though I'd throw it out their. Probably have a bunch parse order issues with this idea.

{exp:query sql="SELECT COUNT(*) as outer_count FROM exp_category_posts WHERE cat_id = '8';"}
    {exp:query sql="SELECT * FROM exp_category_posts WHERE cat_id = '8' LIMIT {outer_count} / 2;"}
        {count}
    {/exp:query}
{/exp:query}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.