The query module was not installed. It is installed now.
maybe someone can help me with:
If there are no subcategories in a category it should display “no subcategory”:
{exp:query sql="SELECT COUNT(cat_id) AS count FROM exp_categories WHERE parent_id = '{category_id}';"}
{count}
{/exp:query}
I tried several things like:
{exp:query sql="SELECT COUNT(cat_id) AS count FROM exp_categories WHERE parent_id = '{category_id}';"}
{if count < 1} No subcategories {/if}
{/exp:query}
But i aint get it work. It shows the {count} where there are (multiple) subcategories. But when an category has no subcategories it does not show “no subcategories”.
Can someone help me?
Thank you for the fast reply