Jump to content

Menu Block - Anchor Link

Recommended Posts

  • Replies 11
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

7 hours ago, geearias said:

Site URL: https://www.beautifeyehtx.com

Does anyone know if you're able to create an anchor link to a specific tab within a menu block? I have 4 tabs under a service menu using the menu block and it'd be great to link to the specific tabs.

TIA!

What is your protected password?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 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
On 12/31/2021 at 11:38 PM, geearias said:

@tuanphanLooking to see if you can help me with the following: I want to link directly to this page so that it goes to the service menu, and shows the "BROWS" tab.

 

https://beautifeyehtx.com/services
PW: beautifeye

Hi. I have no idea to solve this.

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 8 months later...
On 12/27/2021 at 10:16 PM, geearias said:

Does anyone know if you're able to create an anchor link to a specific tab within a menu block?

1 hour ago, JohnNeurauter said:

I would like to have a QR code that goes directly to a brunch menu page for our restaurant

The tabbed panels within a Menu Block do not have an ID that you can jump to like an anchor, so it is not possible to link directly to one of them using a link or QR code.

Instead they are selected using JavaScript which means you'd need some custom JavaScript to be written that selects the relevant tab panel when a visitor users a specific URL query. It's possible to do, but we'd need more information about the site

Edited by paul2009

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 1 year later...
On 9/10/2022 at 3:22 AM, paul2009 said:

The tabbed panels within a Menu Block do not have an ID that you can jump to like an anchor, so it is not possible to link directly to one of them using a link or QR code.

Instead they are selected using JavaScript which means you'd need some custom JavaScript to be written that selects the relevant tab panel when a visitor users a specific URL query. It's possible to do, but we'd need more information about the site

Hey @paul2009 does this mean a website would need custom code written for each anchor link/ tab instance or is there a way to create a universal system?

I have 4 tabs on the below page, each with a custom ID I thought could be used as an anchor link. Website example: https://beehyve.squarespace.com/adhd-support

 

I'm trying to learn JS, do you think it would be possible to create something like this: 

  • On load check url
  • if url contains #
  • get name after # (variable)
  • Find ID on page that matches (variable)
  • Trigger click action

And that would open selected tab.

Thanks!

Link to comment
7 hours ago, melaniejaane said:

I'm trying to learn JS, do you think it would be possible to create something like this

This example sounds like it may help you:

http://www.cssplay.co.uk/menu/cssplay-tabbed-pages.html

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
On 10/19/2023 at 10:21 PM, paul2009 said:

This example sounds like it may help you:

http://www.cssplay.co.uk/menu/cssplay-tabbed-pages.html

Did this help? Please give feedback by clicking an icon below  ⬇️

@paul2009 thanks for the suggestion, that's exactly the kind of thing I want!

Unfortunately it only seems to work when the tab buttons, targets, and content are all in the same section, not in multiple sections like Squarespace. Is there anyway around this?

Created both examples here: https://codepen.io/melaniejaane/pen/vYbBqrN

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.