Is it possible to create nested pages via liquid?

Is it possible to create nested pages via liquid?

rahuli20
Shopify Partner
7 0 0

Hello!

 

I just wanted to know if it is at all possible to have nested pages within Shopify? I know we can't just have nested pages by default but my thought was using page templates and some custom code could we theoretically create multiple nested pages within /pages/*

 

e.g. page template called story could have its URL structure have /story baked in so all pages using the story page will have the following URL structure 

 

domain.com/pages/story/page-name
domain.com/pages/story/another-pagename

domain.com/pages/story/page3

A little more context I'm working on building out a fully custom liquid theme.

Reply 1 (1)

PaulNewton
Shopify Partner
6921 623 1461

Hi @rahuli20  nested pages natively no, so no /pages/story > /pages/story/another-pagename in the url structure nor is there a dedicated system for connecting page content in a hierarchy.

 

Rendering the page content of another page in another page: Yes.

 

  1. Use the pages object and pull in the content using the pages handle. https://shopify.dev/docs/api/liquid/objects/pages 
  2. Or use the blogs & articles CMS features to related content in a hierarchy. Or just products in a collection.
  3. Or use metafields or metaobjects to manage, contain, or relate content to pull in , and or use the metaobjects webpages feature. https://help.shopify.com/en/manual/custom-data/metaobjects/webpages 
  4. Or more advanced use the section rendering api https://shopify.dev/docs/api/ajax/section-rendering 

 

 

 

 

 

 

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org