Subcollection description with dynamic text

hello.

i need some help adding dynamic text to the description of sub-collections.

here is sub-collection

https://vintez-technologies.com/collections/monitor-privacy-filters

if the customer chooses a Diagonal size in the collection filter, this Diagonal size should be added to the text.

if the customer chooses an Aspect ratio in the collection filter, this Aspect ratio should be added to the text.

filtering by the tags.

here is the code with the text, but it doesn’t work:

{% if collection.title == ‘Monitor Privacy Filters’ and current_tags != blank %}

The {{ collection.title }} is easy to attach and remove. Simply attach the {% if current_tags contains 'Inches' %}{{ current_tags }}{% endif %} {{ collection.title }} to your {% if current_tags contains ':' %}{{ current_tags }}{% endif %} aspect ratio display using the attachment strips or slide-mount tabs. This confidentiality screen filter is also reversible. The matte side provides you with glare reduction and the glossy side of the privacy screen will provides you with increased clarity. Protect Your Privacy The privacy screen protector for desktop monitors is a great investment if you want to protect your privacy. It is a convenient and cost-effective way to keep your classified information, intellectual property or any other important data you wish to keep protected.

{% endif %}

so the current_tags not appear in this case.

should I replace any code or something else?

thank you.

Hi @denis-bsp ,

Can you send any screenshot that where and what text you wants to display?

https://t2500591.p.clickup-attachments.com/t2500591/dbf9f4ed-4aca-4e53-9eda-856b9d46a682/Screenshot%202022-08-08%20at%2001.28.58.png?view=open

Hi @denis-bsp

I have checked your {% if current_tags contains ‘Inches’ %}{{ current_tags }}{% endif %}

condition not working so you need to change in code.

ok.

could you please suggest what to change?

thank you.

Replace with this

{% assign inche_tag = current_tags | split: ’ ’ %}

{% if inche_tag[1] == ‘inches"]’ %}

so, the first rule should look like this:

Simply attach the {% assign inche_tag = current_tags | split: ’ ’ %}{% if inche_tag[1] == ‘inches"]’ %}{% endif %}

?