Recent searches


No recent searches

Adding an anchor to a section in a category

Answered


Posted Mar 30, 2022

Hello,

I am trying to add an anchor to a section title.

When going into a category, I want to place letters on the top with links that direct you to a part of the page with the section.

For example: A B C D E F G H....etc....

When a user clicks the letter, "Ex: B", it takes the user to the sections that have all the titles that start with B (our sections are alphabetically organized) 

example image below; clicking on Z will take me to the bottom of the page to the sections that start with "z"


1

2

2 comments

image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Alex,
 
Thanks for posting your question to the Community! You would probably need to do something where all the sections for a given letter such as B are in a specific container element such as a div. Then add a unique id to each them (ex: B letter container is given id:"B-Container") to be able to automatically navigate users to that part of the page. Your href for the anchor tags would just be #B-Container.
 
Hope this helps!
 
Best,
 
Erica

-1


Erica Girges Thank you! How would I be able to insert the separate sections into containers? Is this something I edit in the Section_page.hbs area or?

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post