Jump to content

Create a code snippet template

Recommended Posts

Evening all, I have need to create a button via a code block that I want to put on multiple product detail pages in my shop.  It's a button that does one thing and it needs to do the same thing on about 10 different products.  I'm wondering if there's a way to save these code snippets and add them to other pages without having to re-create the same code block 10 different times?

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I don't think I made myself clear because my request doesn't require the need to look at my site.  Basically what I'm trying to do is create a re-usable piece of code - which in this case happens to be a button.  I don't want to have to re-type the code into every product page that needs this snippet.  I want to make my own button and re-use it anywhere I want.

Hopefully that is a little more clear.  Thanks.

Link to comment

You can assign a tag for these products, then use JavaScript to add button for products belong this tag.

Can you share link to page where you insert a button? We can check easier.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.