I have a navigation set, that has default calls for things found on a Category listing. But a "plain" category wasn't working as we want to display several categories on the page, not just the products. This page is meant to show the groupings that are under a single brand, but not just splat all the products on the page.
The page is fine, and with a little guidance from Tech Support I modified the nav set template/iterator to render the page link in the navigation set.
But we also want to have an image with said link as to have it look like the other category listings.
I assume it possible to assign an image file to a variable. I have tried this, and it lives in the template of the page, but it doesn't seem to show the image.
And for this is the nav item template
The page is fine, and with a little guidance from Tech Support I modified the nav set template/iterator to render the page link in the navigation set.
But we also want to have an image with said link as to have it look like the other category listings.
I assume it possible to assign an image file to a variable. I have tried this, and it lives in the template of the page, but it doesn't seem to show the image.
Code:
<mvt:assign name="l.settings:navigationitem:category:cattree:i mage" value="graphics/00000001/logo-product-main.png" />
Code:
<section><!--<h2>Featured Categories</h2>--> <div class="featured-categories"><mvt:if expr="NOT ISNULL l.settings:readytheme:navigationitems"> <ul class="featured-categories__list no-list row"><mvt:foreach iterator="navigationitem" array="readytheme:navigationitems"><mvt:comment><mvt:if expr="l.settings:navigationitem:link_type NE 'C'"> <mvt:foreachcontinue /> </mvt:if></mvt:comment><mvt:do file="g.Module_Library_DB" name="l.success" value="Category_Load_Code( l.settings:navigationitem:link_dest, l.settings:navigationitem:category )" /> <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-cattree.mvc'" name="l.settings:navigationitem:category:cattree_r esult" value="CSSUI_CatTree_Load( l.settings:navigationitem:category:id, l.settings:navigationitem:category:cattree )" /> <mvt:assign name="l.settings:navigationitem:link_href" value="gettoken( gettoken( l.settings:navigationitem:link, '\"', 2 ), '\"', 1 )" /> <mvt:assign name="l.settings:navigationitem:link" value="glosub( l.settings:navigationitem:link, ' href=', ' class=\"featured-categories__name\" href=' )" /><li class="featured-categories__item column half medium-one-fifth align-center"><mvt:if expr="l.settings:navigationitem:category:cattree:i mage"><a href="&mvt:navigationitem:link_href;" class="featured-categories__image-link vertical-align-parent"><img src="&mvt:navigationitem:category:cattree:image;" alt="&mvt:navigationitem:category:name;" class="featured-categories__image vertical-align"></a></mvt:if>&mvt:navigationitem:link;</li></mvt:foreach> </ul> </mvt:if></div></section>
Comment