Modifying {{ content_for_layout }} with a Shopify app.

Highlighted
New Member
1 0 0

I'm new to app development with Shopify, and I am likely missing some documentation. I have been reviewing the Rest Admin API (https://help.shopify.com/en/api/reference) to try to figure out the answer to this question, and I may be just looking at the wrong documentation.

 

We're trying to develop an application that will add custom data-driven pages to the site that will take product(s) from multiple selected categories and display them all on a single page, with checkout forms for each. This is done already by other apps, but we have to do a custom implementation so we can match the client's specific functionality needs. An example of an app that does something similar is the Bundle Builder app (https://apps.shopify.com/bundlebuilder), which appears to modify the output of {{ content_for_layout }} in the theme.liquid file. It outputs some JSON gathered from the Shopify database (which can be done with the Shopify REST API) and an empty div. Getting the data isn't my concern, but I can't find anywhere in the docs I've looked at where it describes how to modify front-end output.

 

I suspect it may do this by adding a template (but it has not added that template to the theme files) and associating it with the page URL, or by modifying the output of an existing template, or by adding a section and somehow integrating it with a page, or otherwise, but I have been unable to find documentation for how to do any of those tasks in the docs I've looked at. What am I missing?

0 Likes
Shopify Partner
88 5 8

Hi James,

 

Their example store has this page - 

 

https://bundle-builder-demo-store-1.myshopify.com/apps/bundles/bundle/9155

 

If this is the page you are referring to then this is the APP proxy page & you may set it up from Partner's account where you created the APP. 

All you need to make sure that is pass the "header" content type as "application/liquid".

 

If you are looking for a different page, please post the URL here.

Best, Amar

0 Likes