Last active
June 13, 2024 06:05
-
-
Save ihorduchenko/b4f1595d12ef24344171997c1eac6510 to your computer and use it in GitHub Desktop.
Useful Shopify metafields filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} Richtext output {% endcomment %} | |
{{ richtext | metafield_tag }} | |
{% comment %} File output {% endcomment %} | |
<video> | |
<source | |
src="{{ video | file_url }}" | |
type="video/mp4"> | |
</video> | |
{% comment %} File list output (images list) {% endcomment %} | |
{%- assign images = article.metafields.namespace.key -%} | |
{%- for image in images.value -%} | |
{%- assign image_url = image | image_url: height: 450 -%} | |
<img class="object-fill" src="{{ image_url | img_url: 'master' }}" loading="lazy"> | |
{%- endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment