Miva Merchant SEO, eCommerce, Miva Modules, Custom Web Apps, and Miva Merchant troubleshooting.

Miva Merchant & Miva Script News

by
The Gallery


How to override a gallery style in order to change the gallery without redoing things.

The easiest way is to set a global style variable like this:

<mvt:assign name="g.thegallery_style_override" value="'another_style_code'">

This needs to be placed above the module's page item at the bottom of the head, like this:

<mvt:assign name="g.thegallery_style_override" value="'another_style_code'">
<mvt:item name="thegallery"sparam="unite_gallery unite_default products" />

After you do this the module will load a different gallery style. Granted, it's not that useful without a conditional. Let's say you have a product with the code product_123 and you want to load a new style just for that product. You could do it like this:

<mvt:if expr="l.settings:product:code EQ 'product_123'">
<mvt:assign name="g.thegallery_style_override" value="'another_style_code'">
</mvt:if>
<mvt:item name="thegallery"sparam="unite_gallery unite_default products" />


(0/5, vote) my rating:
overall rating:

Please log in to leave a comment.

The blog posts on Scot's Scripts are served by Scot's Blogger, a Miva Merchant blogging module that makes it easy to create a Wordpress style blog, rich content, and extra pages in your Miva Merchant store.