anthonynformal Posted July 20, 2021 Share Posted July 20, 2021 i have a custom template where i would like to include a content block from another page and reuse this content block multiple times. I tried using squarespace:query tag however in the json loaded i dont see any content. for example the code would look similar to this mainpage.region <div> <squarespace:query collection="page-1"> <!-- get content from page 1 --> </squarespace:query> </div> <div> <squarespace:query collection="page-2"> <!-- get content from page 2 --> </squarespace:query> </div> <div> <squarespace:query collection="page-1"> <!-- get content from page 1 again --> </squarespace:query> </div> How can i accomplish this? Link to comment
Beyondspace Posted July 21, 2021 Share Posted July 21, 2021 11 hours ago, anthonynformal said: i have a custom template where i would like to include a content block from another page and reuse this content block multiple times. I tried using squarespace:query tag however in the json loaded i dont see any content. for example the code would look similar to this mainpage.region <div> <squarespace:query collection="page-1"> <!-- get content from page 1 --> </squarespace:query> </div> <div> <squarespace:query collection="page-2"> <!-- get content from page 2 --> </squarespace:query> </div> <div> <squarespace:query collection="page-1"> <!-- get content from page 1 again --> </squarespace:query> </div> How can i accomplish this? I usually query external page with javascript via json-pretty param BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
anthonynformal Posted September 3, 2021 Author Share Posted September 3, 2021 On 7/20/2021 at 11:29 PM, bangank36 said: I usually query external page with javascript via json-pretty param thanks, do you have some code examples? how would i do this? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment