how to modify the liquid render for all templates

Solved
Highlighted
New Member
1 0 0

Hi, I need to modify the html that renders liquid, to be able to insert custom html tags, that will use another external app, what I am looking for is to be able to change that html using the api, not manually, I have created a shopify app with node, and also one using the api shopify-node-api, they all give me access to the assets, but these change a lot according to the theme, I wanted to know if there is any standard option to be able to make that change and that it works in all themas, AFAIK would have to Do something personalized for each theme, any info would help me thanks!

0 Likes

Success.

Shopify Partner
852 86 130

Unfortunately, there are no standard ways, but there are a couple of assets that are present in all themes, like theme.liquid. This is basically a master page for all pages on a Shopify store except checkout pages.

 

You can inject your piece into theme.liquid and it should work for all  themes. It could be a JavaScript snippet that later on is doing some matching/decision on what is the actual page the code is rendered on, i.e. cart, product, collection, etc. and do specific actions.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
1 Like