Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I am trying to display a metafield value as the default content on the product page.
This is the syntax, I am using:
The metafield definition is as follows:
But when I enable it on the theme, it does not show the value. What could I be missing here ???
No, it does not work like this.
In default theme content (previously Theme Language) {{variable}} is not a way to render Liquid variable, but a placeholder for a variable which will be supplied by a theme code.
Say you have a translation called "Quantity of color" under General and it's set as "{{ number }} of this color available"
When your liquid code in theme looks like {{ "general.quantity_of_colors" | t: number: 25 }} the system will output "25 of this color available"
Documentation is here https://shopify.dev/docs/storefronts/themes/architecture/locales/storefront-locale-files#pass-multip...
Oh thanks for the explain. So could you help me with the code/syntax that I can define in the theme code so that I can display a metafield value on the product page for a default content/language?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024