CATEGORIES: Render Header or Footer

Miva Knowledge Base
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.
Important Notice: This information is for internal reference only. Use at your own risk.

CATEGORIES: Render Header or Footer

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

mvkb_tui mvkb_categories mvkb_smt