Shopify Liquid Get Unique Page Content by ID

Solved
squatchcreative
New Member
2 0 0

Is it possible to query a page by ID in the Shopify Liquid Templating API?

 

I have a Page created called Bio.  I would like to get the {{ page.content }} of the Bio page and use it on the home page, so when a content editor changes the Bio, it would update on both the Bio page AND the home page.

 

Something like

{{ assign bio_page = pages.page384848384.content }}
<p>{{ bio_page | strip_html | truncatewords: 48 }}</p>

 

Is this possible?

Squatch Creative
https://www.squatch.us
Accepted Solution (1)

Accepted Solutions
Jason
Shopify Expert
10882 190 2179

This is an accepted solution.

Not by ID but you can reference items by their handle.

eg:

 

 

{{ pages.your-page-handle.content }}

 

 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★

View solution in original post

Reply 1 (1)
Jason
Shopify Expert
10882 190 2179

This is an accepted solution.

Not by ID but you can reference items by their handle.

eg:

 

 

{{ pages.your-page-handle.content }}

 

 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★