Jump to content

Batch coding iframes- want to be able to auto populate iframe destinations for lots of code blocks

Recommended Posts

Site URL: https://celery-prism-5xaj.squarespace.com/

I am using code blocks to create iframe links on pages on my site but I need to create different ones for each page. So I need to create the code for 50 blocks.

The frustrating thing is that the code only has a couple of changes. I am looking for a fast way of merging data from say a css file to populate a couple lines of code, without having to manually cut and paste it.

Here is the code

<div class="thumbs">
<h2>Marc Jacobs</h2>
  </div>
<div style="padding:56.25% 0 0 0;position:relative;">
    </div>
<div class="overlayY">
  <iframe
    src="https://player.vimeo.com/video/710075358?background=1?autoplay=1&loop=1&title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen>
  </iframe>  
  </div>

The only bits I want to change are the bits in orange. I already have all the variations in a spreadsheet.

I imagine the solution isn't in SquareSpace but is some sort of find/ replace in a text editor. Any suggestions?

 

Edited by SnapperGB
change colour of link
Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.