Jump to content

Code block added to template section possible or no?

Go to solution Solved by Jasperica,

Recommended Posts

Hey Yall,
Most likely an easy YES or NO answer,

I am building a single page website with navigation links at the top that take you to a certain section of the page.

I've seen you can anchor to page sections by adding a code block with:
<div ID="anchor">
</div>

or from the Squarespace Help official video:

<p id="anchor"> Some text you want displayed</p>

but I can't find anyway to add a code block to the template sections I have.

It seems like such a basic and common (used on over 50% of existing websites) feature for Squarespace to not have it available?
Like it would seem crazy and wasteful for Squarespace to run their business like "Build a beautiful website with our carefully crafted beautiful templates... that can't have basic functions like navigation links to them."

But the worlds a crazy place so just checking, am I crazy for thinking that there should be some way to create anchors to template sections or is this just normal Squarespace site builder protocol and the templates aren't really meant to be used that much?

I thought since there seemed to be only an option to add it to pages with blocks that there would be a button that would convert the template to a block version without having to start from a blank page and add back in all the image and text layouts. Is this a thing or no?

Thanks for any answers.
Sorry for my probably obvious questions for anyone with more than 3 weeks experience using Squarespace (;^-^)/

Jasper

 

Link to comment

With some sections, eg: Gallery, List Section, you can't add Code Block, you will need to use some code to add it.

In addition, some sections also have anchor ids that you can use

If you share link to page where want to add Code Block, we can help 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
  • 2 weeks later...
  • Solution

Thanks for the help Tuanphan! 🙂
It seemed like the templates had very limiting options in terms of what you can do to them.
Which seems like a shame because Squarespace always going on about how carefully they are hand crafted ...but then can't even page anchor so basically unusable in a lot of situations haha.
I opted to just rebuild the template sections from scratch by inserting blank page which would let me add code blocks.

ALSO! Everything was bugging out and things would be fine in editor mode then everything would rearrange once view regularly. It turned out it was the "div" code messing everything up (text tries to align with it etc.)
So I recommend anyone who wants anchor to just use the


<p id="whatever-you-want-to-name-your-anchor">
</p>

 

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.