Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
In Metafields I created a Page reference definition that I want to show on my product page.
when I try to publish this on my product page {{variant.metafields.my_fields.mypage | metafield_text }} it only shows the title of the product page, but not the body/contents.
If I leave out "|metafield_text" I get gid://shopify/OnlineStorePage/1234123414. Which if I am not mistaken is the Page Object.
I also looked at Shopify.dev and they only reference to the title.
Is there no way to get a page body out of a page object?
Thanks,
Solved! Go to the solution
This is an accepted solution.
Ok after hours of researching and trial and error:
{{ variant.metafields.my_fields.mypage.value.content }}
is showing me the contents (body) of the page as I wanted.
This is an accepted solution.
Ok after hours of researching and trial and error:
{{ variant.metafields.my_fields.mypage.value.content }}
is showing me the contents (body) of the page as I wanted.
Life Savor for this Shopify Community!
Arigato Gozaimasu
Bless!!
Finally, mine also works. Thank you !
Thank you, you're life saver.
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025