Collapsible row for product size chart, how to hide when it's not a shirt

2 0 1

I have mostly shirts in my store so I want to create a size chart that's collapsible in the product page. I'm going to use a dynamic content connected to a page. I create a page for men's sizes, and a page for toddler sizes. But for things like coffee mug, the entire thing doesn't make sense so I will not select any element in the metadata field. I wanted to make it so the row doesn't show up.

I tried something like check to see if

block.settings.content != blank

or != blank

But it doesn't work. I think it's because it's dynamic content?

Reply 1 (1)
Shopify Partner
5931 537 1241

Instead of editing theme code use alternate templates for behavior like this. 


If you must do this as code verify what you think your operating on and output it directly for inspection: "--> {{ }} <--" , the <--" are just random characters to ensure it's easy to spot actually empty content.


It may need to be {% if != "" %} , {% if != "<p></p>" %} or some such

Save time & money ,Ask Questions The Smart Way

Confused? Busy? Get the solution you need

Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to