Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

loading content from other pages


Question

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
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0
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

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...