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.
mvkb_categories mvkb_smt