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.
Pending
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