WoodMartW
WoodMart
Feb 28

Add "Display conditions" in html block

I’ve seen similar requests, but I’d like to describe a specific use case and a possible solution. Use case: I needed to add a content row right before the footer, but only on product pages. The only way I found was to edit products one by one using the Extra Content option, which is very time-consuming. I could create a custom single product layout, but I didn’t want to rebuild the whole product page just to add one block in the pre-footer area. Feature request: Add Display conditions to HTML Blocks, similar to the conditions available for Layouts. Ideally, conditions should include: 1) Where to show it (products, categories, specific products, brands, etc.) 2) A position selector, similar to “Extra Content Position”. This would let us place custom content with a couple of clicks, without editing products one by one or creating a full custom layout. Alternative (if easier to implement): It would also be useful to have global hooks like: - After header (e.g. a banner) - Before footer (e.g. an external reviews band) But the best solution would still be “HTML Block + Display conditions”, because it allows targeted content (by brand/category/product) instead of a universal block.
PendingPending

Mar 4, 2025

YesYes, i already request it. Thank you to do it again ! To be able to put html code conditionally, i made an automation on n8n. I wanted to add all my shortcodes on product page template. And show these shortcodes when they match to there the product tags. If you want to see why it's useful to show shortcode of HTML Blocks conditionall, see the picture

Mar 5, 2025

Enzo Valvasori I hope they will consider it, it would be seriously amazing!

Mar 4, 2025

Oh yes, this is very useful when there is no personalized layout. I had to access 200 products one by one to add a block that would be identical to everyone. It was really easier to create a layout for the category, but around 100 products should not use this block, so I would have to create two layouts maybe.

Mar 5, 2025

Leonardo Defáveri exactly, I'm not using layout for product in some clients websites and that's why I had to it manually as you. Having display conditions in html blocks would be awesome or also some new hooks in product pages are still something.