Miva Merchant Development by Scot's Scripts

CATEGORIES: Render Header or Footer

Miva Random Code Trivia

Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

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)
SEO Audit & Inquiries • News & Updates • SEO for Miva Merchant

CATEGORIES: Render Header or Footer

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.

Scot Ranney • April 10, 2024


The process below is the same for header or footer, just change the word in the Runtime_ManagedProperty_Load_Category function. This function will also load all the settings from the header/footer template into l.settings - usage of the l.all_settings in the Template_Render function takes care of that.

<mvt:assign name="l.cat_code" value="'featured'" />

<mvt:do name="l.ok" file="g.Module_Library_DB" value="category_load_code( l.cat_code, l.settings:_category)" />
<mvt:do file="g.Module_Feature_TUI_DB" name="l.null" value="Runtime_ManagedProperty_Load_Category( 'header', l.settings:_category:id, l.managedproperty )" />

<mvt:if expr="NOT ISNULL l.managedproperty:template_filename">
	<mvt:capture variable="l.settings:output">
		<mvt:do file="g.Store_Template_Path $ l.managedproperty:template_filename" name="l.null" value="Template_Render( l.null, l.all_settings )" />
	</mvt:capture>
	<p>Category header:</p>
	&mvt:output;
</mvt:if>

https://www.scotsscripts.com/mvblog/categories-render-header-or-footer.html

tui categories smt