How to use the same section settings across different templates?

philippe_p
New Member
2 0 1

Hello,

I’m building a store with an infinite product scroll and AJAX filtering on a homepage. Besides products, the rendered array contains a bunch of question cards, concatenated with a product array. The mentioned cards are to be created/edited by shop administrator via blocks. To allow AJAX filtering by product type, I’m sending a httpRequest to '/collections/types?q=*selected product types*' with the collection page containing the same products+cards section as the homepage, but in order to get the desired result shop administrator has to manually duplicate all the blocks from the homepage, which seems quite inconvenient.

Is there any way I can use the same section settings across several templates, namely, Homepage and Collection with no need to create same blocks separately for those two templates?

KetanKumar
Shopify Partner
23660 2382 8694

@philippe_p 

yes your try global template

https://www.shopify.com/partners/blog/shopify-online-store 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
philippe_p
New Member
2 0 1

You mean settings schema? That won’t work here because it doesn’t support blocks. They can only be used in sections.

Anyway, came up with a workaround, moving question cards to collection and loading them on a homepage via AJAX call, but if there’s a nicer, Liquid-only solution, would be great to know it.

0 Likes
KetanKumar
Shopify Partner
23660 2382 8694

@philippe_p 

customization code possible to all new changes 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes