Announcement

Collapse
No announcement yet.

Displaying subcat tree images

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

    Displaying subcat tree images

    I have a snippet of code that is displaying everything but the tree images. What am I doing wrong?

    Code:
    <mvt:assign name="g.category_code" value="'RTA-kitchen-cabinets'" />
    <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( g.Category_Code, l.settings:current_category )" />
    <mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Parent( l.settings:current_category:id, l.settings:sub_categories )" />
    <section class="o-layout u-grids-1 u-grids-3--l x-product-list" style="margin-top:16px;">
    <mvt:foreach iterator="subcat" array="sub_categories">
    <div class="o-layout__item u-text-center x-product-list__item">
    <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-cattree.mvc'" name="l.success" value="CSSUI_CatTree_Load(l.settings:subcat:id, l.settings:subcat:tree_image)" />
    <a class="u-block u-color-black x-product-list__link" href="/&mvt:subcat:code;.html">
    <figure class="x-product-list__figure">
    <picture class="x-product-list__picture"> <img class="x-product-list__image" data-lazy="&mvt:subcat:tree_image:image;" src="" alt="&mvt:subcat:name; Ready to Assemble Kitchen Cabinets"> </picture>
    <figcaption class="x-product-list__figure-caption">
    <mvt:item name="customfields" param="Read_Category_Code( l.settings:subcat:code, 'catadd1', l.settings:catadd1 )" />
    <mvt:if expr="l.settings:catadd1">
    <h4>&mvte:catadd1;</h4>
    </mvt:if>
    <span class="x-product-list__name">&mvt:subcat:name;</span> </figcaption>
    </figure>
    </a> </div>
    </mvt:foreach>
    </section>
    </div>
    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

    #2
    https://docs.miva.com/api-functions/cssui_cattree_load
    https://docs.miva.com/api-functions/cssui_cattitle_load

    the category tree image and title need an external api call.
    Colin Puttick
    Miva Web Developer @ Glendale Designs

    Comment


      #3
      So this won't work

      Code:
      <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-cattree.mvc'" name="l.success" value="CSSUI_CatTree_Load(l.settings:subcat:id, l.settings:subcat:tree_image)" />
      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


        #4
        I found the issue. I had the image path in the data-lazy instead of the src.

        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

        Working...
        X