Filter out unused subcategories? [SOLVED]

  • Hi,


    I'm using a solution originally posted by dazglaser and answered by @hus_hmd and ryan


    The code provides the ability to use different templates based on the subcategory level. This gives similar template options as the <perch:pages id="subitems" encode="false" /> but for subcategories.


    It works great, but currently it displays all subcategories.


    I'd like to be able to filter out any subcategories that aren't assigned to an item/post.


    I usually achieve this by using this code:


    Then in the template.html, I use a perch:if


    Here's the code from the original post:


    How would I modify this code to filter out any subcategories that aren't assigned to an item/post? :/

  • Solved.


  • Stephen Meehan

    Changed the title of the thread from “Filter out unused subcategories?” to “Filter out unused subcategories? [SOLVED]”.