Recent searches


No recent searches

How do I manually create anchor links in articles?



image avatar

Ricardo Pinto

Zendesk Digital Resources Team

Edited Jun 18, 2024


2

21

21 comments

Currently this way of approach not jump into respective section. Any solutions ?

2


Hello Abdul,

Does the link not appear when you create it this way? Do you have an example of the line of code you are using for this link that we can review?

I look forward to assisting on this!

Best,

Chris H
Technical Support Architect

Zendesk offers free, on-demand training for all of our products. Set up your account and start learning today at training.zendesk.com

0


Hi there,

Is it possible to create an anchor tag on the Help Center homepage? For example, if they click a link at the top of the Help Center, it brings them all the way down to where our Knowledge Base is?

Thanks!

0


image avatar

Amy Gracer

Community Moderator

Yes, if I understand what you are looking to do. 

Here is a snippet from my test homepage. The bold "Link" href jumps to the named H1. 

 <section class="section knowledge-base">
     <section class="categories blocks">
          <section class="container">


                  <ul class="blocks-list">
                       <p><a href="#link">Link</a></p>
                        <li class="blocks-item custom"> . . . </li>

                        <li class="blocks-item custom"> . . . </li>

                  </ul>

                   <h1><a name="link">Link</a></h1>
                   
</section>
</section>
</section>

0


Is it possible to anchor link to a heading that isn't H1? For our Style Guide, we prefer headings to be H3 and would find great value in anchor linking - but right now the only way I can get anchor linking to work is if I use H1 for my headers.

0


image avatar

Giuseppe

Zendesk Customer Care

Hi Dawn,

By clicking the Anchor button and choosing Heading, you should be able to choose from the headings in your article, regardless if they're H1 or not:

 

 

 

0


Thanks Giuseppe! For some reason I wasn't seeing that earlier, but now I do. 

0


Hi,

How do I link to an anchor tag in another article?

0


image avatar

Jeff C

Zendesk Customer Care

Hi there,

At the bottom of this article, you'll see a way to do this by doing the following -

You can also link to an anchor link on another page using the full URL plus the hashtag. For example:

<a href="https://support.zendesk.com/entries/98542436#some_anchor_name"></a>

Using a hashtag without a URL works only if the anchor is on the same page.

Let me know if that isnt want you are looking for!

0


Is there a way to add anchors to longer articles so that a user can jump to that part of the article without making it a clickable link? We are adding in context help tips to our UI and want to allow users to click on a link in out UI and be brought to the right section of an article, but don't necessarily need to have actual links in the articles themselves?

1


image avatar

Amy Gracer

Community Moderator

William Grote

You can add anchors using the <a name = "anchor">

Then when you want to link to it, link to the full URL followed by #anchor.

Jeff's example above should work:

<a href="https://support.zendesk.com/entries/98542436#some_anchor_name"></a>

0


THANK YOU! works just as I had hoped for!

0


OK, something changed today, now when I am manually adding anchors, and then go to the links, I see a new section called Anchors?

1


However in another article, I added an anchor tag, and the anchor appears in the Headings list and there is no Anchors section?

1


We are finding that the when anchor link is clicked, it dropped well below the heading.  I have noticed this in every article that we have tried to anchor.  Is this a known issue? 

0


image avatar

Beto

Zendesk Customer Care

Hello Rhonda, thank you for your question!

I can confirm that this is the expected behaviour. When you create an anchor on a heading, once clicked, the "link" will send the user to right below said heading. The idea here is that the user reads the link/phrase that has the hyperlink/anchor, so there would be no need for them to read it again, once they are directed to the paragraphed that is referenced. 

You can see an example of this following this link. This is a hyperlink to an anchor section of the article. Specifically to the section called "Adding articles to the knowledge base" but the link takes you to just below the heading, since you would have already read it if you had seen the article.

You could theoretically create the anchor on a phrase that is right above the heading, so that when you are redirected, you could see the heading instead. But this would mean that you would need to create a different heading for this. 

I hope this was helpful!

0


I find that I cannot link to anchors within articles from outside Zendesk. For example, we want to link into a section of an article from our UI, so we create an anchor for that section that works fine within Zendesk. But the link from the UI just goes to the top of the article. 

Zendesk, is there a fix or workaround for this?

0


Hi Mark, thanks for your question.
 
Anchor links are not specific to Zendesk. This is a HTML element and it should work even if the link is outside Zendesk.
Maybe try with a different web browser. This may be due to the configuration of your browser.

0


This does not work. I've tried linking from one article to another article using the heading id. I've created an <a name="something"></a> anchor in an article, then linked to it from another article using [article url]#something. I just get the top of the article, not the anchor, every time. I also tried adding a “name” attribute in the h tag (e.g. <h2 id="e348543573" name="useful-name"> and upon saving the article the name attribute is deleted! 
It would sure be nice to link from one article to a heading in another one but I cannot do this at all. 

0


image avatar

Paolo

Zendesk Engineering

Hello Shahir,
 
We would need to see the actual article where your anchors are added. Please reach out to our Support Team and provide as much information as possible. You may follow the guide here: Contacting Zendesk Customer Support.
 
Best,
Paolo | Technical Support Engineer | Zendesk

0


Hi, when clicking an anchor link in an article, it sometimes does not reach the exact location in the destination - sometimes above, sometimes below. This can sometimes be even a page above or below. Are you aware of this issue which makes using anchor tags in articles a bit problematic. Also, according to this reference, using the name attribute (as advised in your article) has been deprecated and replaced with id. Even replacing with id does not always cause the link to reach the desired destination. Would be grateful to hear what others are experiencing and possible workarounds for this issue. At this point, I am minimizing my use of anchors as much as possible. Thanks!

0


Please sign in to leave a comment.