Recent searches


No recent searches

Make it easier to create anchor links to sub-sections of an article



Posted May 19, 2016

As a product designer/documentation writer, I want to be able to easily link to a particular section within an article that is hosted on my Zendesk support site – for example, from release notes, from in-app error messages, from other support site articles.

Right now I have to manually add name attributes to headers, which is annoying and time consuming given how often I have to do this.

One solution could be to auto-generate name attributes for all h1 h2 h3 h4 h5 based on the text within the heading tag. e.g. opening tag of <h1>Integrating with Zendesk</h1> becomes <h1 name="integrating-with-zendesk"> upon article save.


23

24

24 comments

Official

image avatar

Ryan McGrew

Zendesk Product Manager

Hey All,

We've just released 2 updates to linking in the article editor. Firstly, you'll be able to link to any heading within a document. Just select the text you want to link, click the link icon and click Headings. You can then select any heading in the document to link to. You'll also be able to link to any anchor tag with a name attribute.

Secondly, we've made it easier to link to other articles. If you go to the Help Center articles tab, you'll be able to search for and link to other articles in the same Help Center

It's not an auto-generated table of contents, but that's something we'll keep as feedback and will look at ways we can potentially add it. 

Thanks!

1


I definitely agree! Are there any updates on this (initially logged in 2016!!)? Right now, every time I want to share a specific section with someone and I want the link to redirect them right to this section, I have to manually add name attributes (anchors) to headers, which is very time-consuming and frustrating. For H2 headers, sharing the link that includes the H2 header should ALWAYS direct to that specific section. Check the example below for clarity:

Is there any way to do the above with custom code or something? I would prefer our developers to implement something rather than wait for a simple feature that will never come. Thanks!

0


+100

We just switched to Zendesk from ReadMe and this really bothers our team. People are not happy about it.

0


Hi there

I'm trying to add a link to a heading within an article but it's merging 2 headings instead of allowing me to just select one. In the bottom example I'm trying to select the bottom heading but it's automatically highlighting both. These 2 headings are separated in the article by fairly lengthy paragraphs so it's not like they are directly under each other. 

What is the cause of this?

0


Hey 396306771234,

I definitely agree that being at 50% zoom is not ideal. I'm wondering, is the heading being obscured by Agent Navigation bar? If so, you can collapse it with the small handle "handle" in the center.

If not, do you have an example I could see in the wild?

0


8725495828 - I am having the same experience as Karlina with the links.  When clicking it jumps past the header of the section and goes directly to displaying the content.  I have tried this on my laptop as well as with an external monitor.  I've also tried in different browsers, zooms, and with/without the bookmark bar displayed.  The only time I am able to see the header displayed when clicking the link is when I am at 50% zoom (everything half sized) in Chrome which isn't really a normal use case for anyone viewing the KB.  I'll include a screenshot of what I see when clicking the link and what ideally the result would be when clicking the link.  Any advice here would be appreciated - thank you!

0


Thanks Sebastiaan,

That is so helpful. Much appreciated.

Cheers,

0


Hello Rich,

That's possible! 

It's basically (https://your.domain.com)/path/to/article#header-id. So to get that URL you could do this:

The description below assumes that you also have internal links to the headers in the article. If that's not the case skip it and continue in the P.S.

First look in the target article, what the link to the header is. It will be something like #h_4b03f065-174e-4006-bd66-e9d6817248f4.

Now go to the source article, create a link to the target article. Then switch to the URL tab again. It will show something like /hc/en-us/articles/360003861679

Now combine the two like this /hc/en-us/articles/360003861679#h_4b03f065-174e-4006-bd66-e9d6817248f4.

With kind regards,

Sebastiaan
Sparkly ⭐

P.S.

In case you don't have internal links in the article, Zendesk didn't create the ID for you. In that case you can add one manually, by editing the source code:Now find the header and add an ID:

Now you can use this id in your URL /hc/en-us/articles/360003861679#alderaan.

1


Hi everyone,

Is there a way to link to a heading in a different article?

I'm happy to enter the code myself, but I don't know how.

Cheers,

0


Hello,

While I appreciate the updates, the original use case of this post has not been addressed.

Essentially what should happen is, every time you create a heading (h1, h2, etc.) in an article, it should immediately be assigned a corresponding anchor. So if my heading reads "Get Started" a link should be created for subdomain.zendesk.com/hc/en-us/articles/article-name/get-started/

GitHub does this really well for their README.md files, every heading that you create receives a corresponding anchor tag.

Thanks for reading!

1


Hi Ryan,

Thank you for the speedy update. 

You are right!! I've tried adjusting the height and all seems good now.

 

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post