Miva Merchant Ready Theme Images Loop

image
image
image
image
image
image

To loop ready theme images, create image containers with code ending 1,2 3 so on. for example create image code like home_image_1, home_image_2 so on and then you can use the below code and it will loop through and will display dynamically.

<mvt:assign name=”l.settings:bcounter” value=”1″ />
<mvt:while expr=”l.settings:bcounter LE 10″>
<mvt:item name=”readytheme” param=”Load_Image(‘home_image_’$l.all_settings:bcounter,g.sfntbanner)” />
<mvt:do name=”l.null” file=”g.Module_Library_DB” value=”Image_Load_ID( g.sfntbanner:image_id, g.MM_Image )” />
<mvt:if expr=”g.sfntbanner AND NOT ISNULL g.MM_Image”>
<mvt:assign name=”l.settings:linkurl” value=”g.sfntbanner:link_dest” />
<mvt:assign name=”l.uri:store_id” value=”g.Store:id” />
<mvt:assign name=”l.uri:screen” value=””” />
<mvt:if expr=”g.sfntbanner:link_type EQ ‘P'”>
<mvt:do file=”g.Module_Library_DB” name=”l.success” value=”Product_Load_Code(g.sfntbanner:link_dest, l.settings:productdata)” />
<mvt:assign name=”l.uri:product_id” value=”l.settings:productdata:id” />
<mvt:do file=”g.Module_Feature_URI_DB” name=”l.have_uri” value=”URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )” />
<mvt:assign name=”l.settings:linkurl” value=”l.settings:canonical_uri:uri” />
<mvt:elseif expr=”g.sfntbanner:link_type EQ ‘C'”>
<mvt:do file=”g.Module_Library_DB” name=”l.success” value=”Category_Load_Code(g.sfntbanner:link_dest, l.settings:categorydata)” />
<mvt:assign name=”l.uri:cat_id” value=”l.settings:categorydata:id” />
<mvt:do file=”g.Module_Feature_URI_DB” name=”l.have_uri” value=”URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )” />
<mvt:assign name=”l.settings:linkurl” value=”l.settings:canonical_uri:uri” />
<mvt:elseif expr=”g.sfntbanner:link_type EQ ‘G'”>
<mvt:do file=”g.Module_Library_DB” name=”l.success” value=”Page_Load_Code(g.sfntbanner:link_dest, l.settings:pagedata)” />
<mvt:assign name=”l.uri:page_id” value=”l.settings:pagedata:id” />
<mvt:do file=”g.Module_Feature_URI_DB” name=”l.have_uri” value=”URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )” />
<mvt:assign name=”l.settings:linkurl” value=”l.settings:canonical_uri:uri” />
</mvt:if>
<div>
<a href=”linkurl;” target=”_self”> <img src=”&mvt:global:MM_Image:image;” title=”&mvt:global:sfntbanner:image_alt;” alt=”&mvt:global:sfntbanner:image_alt;”>
<span>
&mvt:global:sfntbanner:image_alt;
</span></a>
</div>
</mvt:if>
<mvt:assign name=”l.settings:bcounter” value=”l.settings:bcounter + 1″ />
</mvt:while>