Miva Merchant Development by Scot's Scripts

CATEGORY: How to Detect Category Header/Footer Contents

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

CATEGORY: How to Detect Category Header/Footer Contents

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.

Bruce Golub • February 06, 2024


Because category headers and footers are rendered via an SMT Item, there isn't a variable to detect before that item is rendered. So, the solution is thus:

<mvt:capture variable="g.has_header">
<mvt:item name="prod_ctgy_hdft" param="ctgy_header" />
</mvt:capture>

Now you have a variable you can use:

<mvt:if expr="g.has_header"> do something </mvt:if>

Obviously, this can be used for any SMT item that renders content.


https://www.scotsscripts.com/mvblog/how-to-detect-category-headerfooter-contents.html

categories smt