Miva Merchant Development by Scot's Scripts

READYTHEME: Literal Functions for Loading Images, Navsets, etc...

Miva Knowledge Base
READYTHEME: Literal Functions for Loading Images, Navsets, etc...

WARNING:

This information is offered "AS IS" for internal reference only. Use at your own risk.
Does AI actually understand your Miva Merchant store? Our smart JSON-LD schema generator makes sure it does. Contact us to get started. (more info)

READYTHEME: Literal Functions for Loading Images, Navsets, etc...

Scot Ranney • May 19, 2026 (updated: July 23, 2026)


THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED;
THE AUTHOR DISCLAIMS ALL LIABILITY FOR ANY DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR STORE DISRUPTIONS ARISING FROM ITS USE.


In Miva Merchant templates this page references pseudo-function page items: https://docs.miva.com/developer/developer-training/working-with-theme-components/functions/

Important: It is altogether possible that Miva will change how these functions work. They don't put readytheme source code in the LSK and the only things they want you to use are in the link above. However if you need to grab some readytheme data in a module you can't use the pseudo-functions, you need the real thing.

IMAGES

Do we really want to always load the entire image tag? Let's just load a readytheme image via code and then use the data we get. Probably faster than a readytheme page item anyway.

Load a ReadyTheme image via image code:

<mvt:do file="g.module_root $ g.module_path $ 'component/readytheme.mvc'" name="l.ok" value="readytheme_image_load_code('sfnt-hero-mobile',l.settings:_image)" />

Image data structure:

l.all_settings:_image: 14 elements
:active = 1
:code = sfnt-hero-mobile
:css_class = img-fluid
:image = graphics/00000001/1/RRP-moving-mobile-2.jpg
:image_alt = Premium inkjet photo and art papers
:image_hght = 0
:image_size = 0
:image_wdth = 0
:link_targ = _self
:link_type = U
:name = Storefront Hero Mobile
:original_code = sfnt-hero-mobile

Nifty way to load desktop and mobile and display them properly:

<mvt:do file="'/mm5/5.00/modules/component/readytheme.mvc'" name="l.ok" value="readytheme_image_load_code( 'sfnt-hero', l.settings:hero )" />
<mvt:do file="'/mm5/5.00/modules/component/readytheme.mvc'" name="l.ok" value="readytheme_image_load_code( 'sfnt-hero-mobile', l.settings:hero_mobile )" />

<picture>
  <source media="(min-width: 768px)" srcset="&mvt:hero:image;">
  <img src="&mvt:hero_mobile:image;" 
	   class="&mvt:hero_mobile:css_class;" 
	   fetchpriority="high" 
	   alt="&mvt:hero_mobile:image_alt;">
</picture>

NAVSETS

<mvt:do file="g.module_root $ g.module_path $ 'component/readytheme.mvc'" name="l.ok" value="readytheme_navigationset_load_code( 'account_navigation', l.settings:output)" />

https://www.scotsscripts.com/mvblog/readytheme-manual-image-load-via-code.html

mvkb_readytheme mvkb_smt