I’m attempting to add a “Documentation” link to products via metafields.
First, I create a metafield ‘products.metafields.my_fields.product_documentation’ to a URL type, and placed the URL inside that field.
Then on the Product Template I’m adding the Custom Liquid option. The idea here is that if the documentation link has anything in it (which would be a URL) then it would show a link to documentation. I’ve tried a few things and can’t seem to get it to work.
All of these were tested with a value in the relevant metafield.
{%- if products.metafields.my_fields.product_documentation -%}Documentation
{%- endif -%}
Nothing happens
{% if products.metafields.my_fields.product_documentation == TRUE%}Documentation
{% endif %}
The link will appear, the URL is not formatted correctly.
{% if products.metafields.my_fields.product_documentation == 1%}Documentation
{% endif %}
As expected the documentation link did NOT show up.
Do I need to do something to get products.metafields.my_fields.product_documentation to return the actual URL that’s been placed inside the metafeild?
