I have two product sections defined, called Special Offers and Clearance Items, which will only occasionally have products available. When there are no products available for either of these product categories, I can click ‘Hide on Web Site’ in the Section Details for the relevant section, and the menu links for that category are no longer visible, and that is a simple solution.
However, in addition to menu links, I also have two dedicated graphics in a side column (on the home page and on all product pages), and code in the Outer layout makes these graphics hyperlinks to the relevant product section page, e.g. <a href="special-offers.html"><img src="special-offers.gif" /></a>.
I would also like to hide these graphics, whenever the relevant product sections have no products defined. I imagine this would require the use of a Block If code structure, and either a standard built-in variable (if available) or a custom variable.
Please suggest some sample code which I could try.
James
However, in addition to menu links, I also have two dedicated graphics in a side column (on the home page and on all product pages), and code in the Outer layout makes these graphics hyperlinks to the relevant product section page, e.g. <a href="special-offers.html"><img src="special-offers.gif" /></a>.
I would also like to hide these graphics, whenever the relevant product sections have no products defined. I imagine this would require the use of a Block If code structure, and either a standard built-in variable (if available) or a custom variable.
Please suggest some sample code which I could try.
James
Comment