Announcement

Collapse
No announcement yet.

Category Tree > Display Top Categories Only

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

    #16
    Re: Category Tree > Display Top Categories Only

    It looks like you may have also tried to use the EQ 1 in div class. It's not needed there. In your CSS file, add a style for level-2 to hide it.


    Code:
    #category-tree .level-2 {
    	display:none;
    }
    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    Comment


      #17
      Re: Category Tree > Display Top Categories Only

      Hi lesliekirk, when I try to use a display:none for level 2, the links disappear but not the space for them so hiding them that way didn't quite give me the results I needed.

      I did however, get it working with the help of Kyle, a Web Development Specialist at MIVA Support. For those that search thru the forums and are looking for a proven way to resolve this dilemma, I will post it here without my custom divs:

      Code:
      <mvt:foreach array="cattree_categories" iterator="cattree_category">
      <mvt:if expr="l.settings:cattree_category:level EQ '1'">
      <mvt:if expr="NOT ISNULL l.settings:category:id AND l.settings:category:id EQ l.settings:cattree_category:id">
      
      <div class="level-&mvte:cattree_category:level; active">
      <mvt:elseif expr="NOT ISNULL g.Category_Code AND ISNULL   l.settings:category:id AND l.settings:cattree_category:code EQ   g.Category_Code">
      <div class="level-&mvte:cattree_category:level; active">
      <mvt:else>
      <div class="level-&mvte:cattree_category:level;">
      </mvt:if>
      <a href="&mvte:cattree_category:link;">
      <mvt:if expr="l.settings:cattree_category:image">
      <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
      <mvt:else>
      &mvte:cattree_category:name;
      </mvt:if>
      </a>
      </div>
      </mvt:if>
      </mvt:foreach>
      Hopefully this will help some others. thanks for all the helpful posts everyone!

      Roz
      Last edited by neuroticartist; 12-31-13, 08:05 AM.

      Comment

      Working...
      X