Announcement

Collapse
No announcement yet.

How Do I Iterate Through Sub Categories

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How Do I Iterate Through Sub Categories

    I have a category named "1inch" which is the parent category for multiple subcategories.


    How do I iterate though all of the subcategories of this parent category? I would like to link to each of the subcategory pages too.


    Thanks in advance!

    #2
    Re: How Do I Iterate Through Sub Categories

    This can be done using the toolkit module.

    http://emporiumplus.com/1AA00223.html

    Code:
    <mvt:item name="toolkit" param="subcat|ccount|g.Category_Code" />
    <mvt:if expr="ccount GT 0">
    	<mvt:foreach iterator="sub_category" array="sub_categories">
    		&mvt:sub_category:name;
    	</mvt:foreach>
    </mvt:if>

    It is also worth noting, that this functionality will be built into Version 9 due out this Fall.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    Working...
    X