Jump to content

Injecting a Portfolio Collection across non-portfolio pages

Recommended Posts

I may be trying to achieve the impossible but I've created a hover portfolio collection page and am now trying to inject that page section across several other standard pages using javascript. The portfolio collection is named Portfolio Categories and I'm inputting a code block on the other pages with <div class="categories-section"></div> to load in the portfolio collection. But it's not loading correctly. It's obviously partially working because I see the code, but it's not displaying properly so not sure where I am going wrong? I'm definitely not a javascript expert but was really hoping I could get this working.  

<script type="application/javascript">
$(function() {
   $('.categories-section').load('/portfolio-categories .portfolio-hover',function(){
      window.Squarespace.initializeLayoutBlocks(Y);    
    });
});
</script>

If anyone has any input would greatly appreciate some guidance!

Site is https://designauthentic.squarespace.com/ and password is designauthentic 

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 1/21/2023 at 9:28 AM, mjcreative said:

I may be trying to achieve the impossible but I've created a hover portfolio collection page and am now trying to inject that page section across several other standard pages using javascript. The portfolio collection is named Portfolio Categories and I'm inputting a code block on the other pages with <div class="categories-section"></div> to load in the portfolio collection. But it's not loading correctly. It's obviously partially working because I see the code, but it's not displaying properly so not sure where I am going wrong? I'm definitely not a javascript expert but was really hoping I could get this working.  

<script type="application/javascript">
$(function() {
   $('.categories-section').load('/portfolio-categories .portfolio-hover',function(){
      window.Squarespace.initializeLayoutBlocks(Y);    
    });
});
</script>

If anyone has any input would greatly appreciate some guidance!

Site is https://designauthentic.squarespace.com/ and password is designauthentic 

Do you mean getting the content from this page

image.thumb.png.e0170f864de10d237aa40907af397c53.png

then render it into another page?

 

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

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.