All-
I've seen a few threads on this, but nothing seemed to quite have it right with any code examples (at least not that I could find). What I am trying to do is create the category list as an unordered list where the subcategories are then unordered lists of their own. I think I'm somewhat close, but not quite there. Below is what I have so far:
If you want to see an example, check this out:
http://www.finfeather.com/Merchant2/...gory_Code=HUNT
It seems to work ok, but it isn't quite perfect where the sub-list is between the opening and closing LI tags of the list that precedes it. Picky, I know.
It is set up so that the top level opening and closing UL tags are actually in the Category Tree Template header and footer. Some misc. list items are in there as well (non-MM pages, Account login, etc.). Does anyone have any suggestions on how I can refine this? I would think lots of people have tackled this before and probably have more insight into Miva's code than I do.
Thanks in advance.
-Bill
I've seen a few threads on this, but nothing seemed to quite have it right with any code examples (at least not that I could find). What I am trying to do is create the category list as an unordered list where the subcategories are then unordered lists of their own. I think I'm somewhat close, but not quite there. Below is what I have so far:
Code:
<mvt:if expr="l.settings:cattree:stack EQ 0"> <mvt:item name="category_tree" param="cattree_header" /> </mvt:if> <mvt:if expr="l.settings:nextcount GT 0"> <mvt:if expr="l.settings:cattree:stack GT 0"> <ul style="padding: 0 0 0 10px;"> <mvt:else> </mvt:if> <mvt:item name="category_tree" param="nextlevel"> <mvt:foreach iterator="cattree_category" array="categories"> <mvt:if expr="l.settings:cattree_category:code EQ g.Category_code"> <mvt:if expr="NOT l.settings:cattree_category:image"> <li><strong>&mvt:cattree_category:name;</strong></li> <mvt:else> <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" border=0> </mvt:if> <mvt:else> <li><a href="&mvt:global:sessionurl;Screen=CTGY&Store_Code=&mvta:store:code;&Category_Code=&mvta:cattree_category:code;">&mvt:cattree_category:name;</a> </mvt:if> </li> <mvt:if expr="l.settings:cattree_category:id EQ l.settings:cattreenext"> <mvt:item name="category_tree"/> </mvt:if> </mvt:foreach> </mvt:item> <mvt:if expr="l.settings:cattree:stack GT 0"> </ul> <mvt:else> </mvt:if> </mvt:if> <mvt:if expr="l.settings:cattree:stack EQ 0"> <mvt:item name="category_tree" param="cattree_footer" /> </mvt:if>
http://www.finfeather.com/Merchant2/...gory_Code=HUNT
It seems to work ok, but it isn't quite perfect where the sub-list is between the opening and closing LI tags of the list that precedes it. Picky, I know.
It is set up so that the top level opening and closing UL tags are actually in the Category Tree Template header and footer. Some misc. list items are in there as well (non-MM pages, Account login, etc.). Does anyone have any suggestions on how I can refine this? I would think lots of people have tackled this before and probably have more insight into Miva's code than I do.
Thanks in advance.
-Bill
Comment