Announcement

Collapse
No announcement yet.

Sub-Category images

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

    #16
    Re: Sub-Category images

    Here is the entire code that I use on my content(subcategory_listing) tab. You may not need all of it or can re-arrange it, but I just copied the whole thing here for you.
    Code:
    <div id="subcategory-listing">
        <mvt:comment>Assign temporary variable for g.Category_Code</mvt:comment>
        <mvt:item name="toolkit" param="vassign|Orig_Cat_Code|Category_Code" />
            <mvt:foreach iterator="sub_category" array="sub_categories">
                <mvt:item name="toolkit" param="catimage|subcatImage|l.all_settings:sub_category:code" />
                <mvt:if expr="(pos1 MOD 4) EQ 1">
                    <div class="product-wrapper first">
                <mvt:else>
                    <div class="product-wrapper">
                </mvt:if>
                    <a href="/category/&mvta:sub_category:code;.html" title="&mvte:sub_category:name;">
                       <mvt:if expr="subcatImage">
                        <img src="&mvte:global:subcatImage;" alt="&mvte:sub_category:name;" title="&mvte:sub_category:name;" />
                       <mvt:else>
                        <img src="../images/img_no_thumb.jpg" alt="&mvte:sub_category:name;" title="&mvte:sub_category:name;" />
                       </mvt:if>
                    </a>
                    <span class="product-wrapper-name">&mvte:sub_category:name;</span>
        <mvt:comment>Fake out the header lookup with the subcategory code</mvt:comment>
        <mvt:item name="toolkit" param="vassign|Category_Code|l.all_settings:sub_category:code" />
        <mvt:item name="toolkit" param="header|subcathead" />
        <mvt:if expr="g.subcathead">
          <mvt:item name="toolkit" param="brief|briefdesc|g.subcathead|275|2" /> 
          <div style="text-align: left;">&mvt:global:briefdesc;.&nbsp;.</div>
        </mvt:if><br />
    <div class="read-more"><a style="text-decoration: none;" href="/category/&mvta:sub_category:code;.html">Get Details>></a></div>
                </div>
            </mvt:foreach>
        <mvt:comment>Reassign the original g.Category_Code</mvt:comment>
        <mvt:item name="toolkit" param="vassign|Category_Code|Orig_Cat_Code" />
    </div>
    Maxanne Durkee
    Heavyweight Collections - Premium Heavy T-Shirts
    Facebook, Twitter, Blog

    Comment


      #17
      Re: Sub-Category images

      there is no subcat function in your code
      Last edited by wcw; 09-05-14, 02:53 PM.
      Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
      Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
      Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
      Facebook http://www.facebook.com/EmporiumPlus
      Twitter http://twitter.com/emporiumplus

      Comment


        #18
        Re: Sub-Category images

        Oh sorry! Like I had said, it has been a long while since I worked on that. I most likely didn't need that part on my page but the link to the thread where I found the answer is here
        Maxanne Durkee
        Heavyweight Collections - Premium Heavy T-Shirts
        Facebook, Twitter, Blog

        Comment


          #19
          Re: Sub-Category images

          Hi,

          Thanks for trying to help me with this.

          This code below is almost perfect...but it needs to be edited to pull in and display the Category 'Title Image' vs. the Category Tree Image that it is doing right now...any idea how to edit this to do that? -->

          <mvt:item name="toolkit" param="subcat|ccount|g.Category_Code" />
          <div class="row">
          <mvt:foreach iterator="sub_category" array="sub_categories">
          <mvt:item name="toolkit" param="cattreeimage|subcatImage|l.all_settings:sub _category:code" />
          <div class="col-md-3 col-sm-4 col-xs-6">
          <div class="subcategory-item">
          <div class="item-image">
          <a href="../category/&mvta:sub_category:code;.html" title="&mvte:sub_category:name;"><mvt:if expr="subcatImage"><img src="/mm5/sm/&mvte:global:subcatImage;" alt="&mvt:sub_category:name;" title="&mvt:sub_category:name;" class="img-responsive"/><mvt:else><img src="/mm5/images/img_no_thumb.jpg" alt="&mvt:sub_category:name;" title="&mvt:sub_category:name;" class="img-responsive" /></mvt:if></a>
          </div>
          <div class="clearfix"></div>
          <div class="center"><h5><a href="../category/&mvta:sub_category:code;.html">&mvt:sub_category:n ame;</a></h5></div>
          </div></div>
          </mvt:foreach>
          </div>


          Thanks again!
          Last edited by rcm1234; 09-09-14, 10:19 AM.

          Comment

          Working...
          X