Hi all,
I’m developing a custom block in OS 2.0 and inside the product-template.liquid file I’m using the
{%- when 'optical_link' -%}
to show the block when it’s selected from the theme editor.
Till here everything seems working fine, the link is visible and it works.
Now I need this section to appear only if the link is not blank so I’ve added the if statement as following
{%- when 'optical_link' -%}
{%if product.metafileds.my_fields.optical_link != blank %}
{{block.settings.optical_link_text}}
Click Here
{% endif %}
Unfortunately when I add the if statement nothing is showing up even if the metafield is not blank.
If I remove the if statement everything works fine.
Is there someone who could help me out?