Inserting and editing links in articles

Return to top

62 Comments

  • Shane Smith

    Is there a way to get a "where used" list of every article link in Zendesk? We often have a situation where we have dozens of links to the same article in Guide and we need to update them (or remove them).

    If there is an automated way to do this, please let me know. Thanks!

    11
  • Alice SMITH

    Hello,

    I cannot get anchor links to jump to the anchored section in the Knowledge App. This quadruples the work to create and maintain. Please advise.

    2
  • George Diaz

    Hello,

    I'm trying to link headings within an article to make a table of contents, however a common issue is when linking to a heading, it displays the content immediately below the heading, is there a way to link to the heading, but also include the heading to show a user what section they are in?

    Thank you!

    2
  • Abdul Khader Malim

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

    2
  • James Rodewig
    Zendesk Documentation Team

    Hi Rebeca,

    Sorry to hear you're having to manually update all those links. Sounds exhausting!

    If you haven't yet, I recommend reading our Using the Help Center API to manage article translations article in the Developer Docs. It gives you some tips for using code to handle your help center translations. We tried to make the article beginner-friendly, so I hope it's useful even if you don't have any prior programming experience.

    Toward the end of the article, there's a section that covers uploading translations as a deliverable. If you're uploading translations from JSON like in the article, you can add a line to the Python script in that section to update Help Center links in your translations. The line essentially finds and replaces /hc/en-us/ in your translations with /hc/{locale}/.

    Here's the modified script (the new line starts with article['body']):

    import json

    import requests

    auth = ('your_email', 'your_password')

    print('- reading deliverable file')

    with open('2021-04-15_deliverable.json', mode='r', encoding='utf-8') as f:

    deliverable = json.load(f)

    for locale in deliverable:

    print(f'\n- uploading {locale} translations')

    for article in deliverable[locale]:

    article_id = article['id']

    article['body'] = article['body'].replace('/hc/en-us', '/hc/' + str(locale))

    # get missing translations to determine if should use a PUT or POST request

    url = f'https://example.zendesk.com/api/v2/help_center/articles/{article_id}/translations/missing.json'

    response = requests.get(url, auth=auth).json()

    missing_translations = response['locales']

    if locale in missing_translations:

    # new translation -> do a POST request

    print(f' - posting translation for article {article_id}')

    post_url = f'https://example.zendesk.com/api/v2/help_center/articles/{article_id}/translations.json'

    data = {'translation': {'locale': locale, 'title': article['title'], 'body': article['body']}}

    response = requests.post(post_url, json=data, auth=auth)

    else:

    # existing translation -> do a PUT request

    print(f' - putting translation for article {article_id}')

    put_url = f'https://example.zendesk.com/api/v2/help_center/articles/{article_id}/translations/{locale}.json'

    data = {'translation': {'title': article['title'], 'body': article['body']}}

    response = requests.put(put_url, json=data, auth=auth)


    As a note, there is a typo in the article snippet (https://example.zendesk.com is written as https://example.zendesk.com.zendesk.com). I fixed the typo in the script above and will update the article shortly.

    I hope that helps! 

    2
  • Janine Deegan

    I'd like "Open in a new tab" to be defaulted On. Is there any way to do that?

    2
  • Dave Dyson

    Hey Aaron!

    Sure thing! Here's a way to change the color of specific hyperlinks in your Help Center. You're going to need to know how to edit the HTML source code in your articles (see Help Center article editor toolbar reference and look for the "source code" toolbar button), and how to edit the CSS file in your Help Center theme (see Customizing your help center theme).

    For this example, I created a simple article with two links (this already has my modifications applied, where I've changed the second link to green):

    In the article source code, I've added a "class" attribute ("alternate_link_color") to the second link's html:

    And then added some CSS to the bottom of my help center theme's style.css file (adding it to the bottom means it will override any CSS above it). Note that I've added a brighter green for the link, and then a dimmer green for links that have been visited):

    You can search for "html color picker" online to find tools that will allow you to generate the color code you want for inclusion in your CSS. 

    Hope that helps!

    1
  • Milan Wack

    Hi!

    There seems to be a bug. I'm no longer able to link headings within one article - which is necessary for the structure of my articles. Can you please investigate here or tell me - what I'm doing wrong? (It worked well until cw 42/2021.)
    Thx! 

    1
  • zendeskagent

    We are able to see the contents in the heading, However, when we try to link with in the article, It jumps to other section of the article. 

    Zendesk team, can someone help me on this. 

    1
  • Jan Schweigerer

    Hi there! Love this feature so far. 

    Instead of linking a specific article, I'd like to link to a section though. Any advice on how I could do that?

    1
  • Movell Sarran

    Can you insert Guide articles easily into Agent Live Chats?

    1
  • Dave Dyson

    Hi George!

    I've seen this too! But I believe you're seeing the same thing I have, which is when you're looking at an article as a agent, the heading will be obscured by the toolbar that includes the links to add and edit articles. But if you mouse over that toolbar, a little up arrow will appear under the center of the toolbar, and if you click that arrow, the toolbar will slide up and you'll see the header (which is what your end-users will see).

    You can also verify this by viewing the article when logged out (assuming the article is set to by viewable by "Everyone", or by logging in as an end-user.

    Hope this helps!

    1
  • Holden Hewett

    There is definitely a bug. It looks like only the first heading is being added to the list of selectable headings.

    Heading ids are not automatically being generated any longer. You can work around this by manually adding ids to each heading:

    After adding ids to each heading:

     

    Like many others, this is extremely disrupting to my workflow when creating articles.

    Please provide some kind of update if this is a bug or new intended behavior.

    1
  • Jennifer Rowe
    Zendesk Documentation Team

    Hi Rebeca

    I know you might not have dev resources to help with this, but just thought I'd mention that we run a script to update links in all our translations when we publish them. That's how we manage it for the documentation here at Zendesk.

    Unfortunately there's not a a native solution, as Anne mentioned.  

    1
  • Dganit Rauchwerger

    Hi,

    Although I have defined text sections in my article with Heading 4, they are not appearing in the Heading tab when I try to link to them from within the article. Until today, this was working fine.

    Would appreciate any help.

    Thanks,

    Dganit

    1
  • Russell Chee
    Zendesk Customer Care

    Hey Shane,
    Thanks for reaching out to us, I hope you are well. Thank you for letting us know your use case around the workflow you are looking to implement.
    To set expectations, at this current time unfortunately there is not a feature like this within Zendesk that could detect certain hyperlinks so you can list them and change them. Having said that please feel free to post in our Product Feedback forum for Guide with your particular use case where like-minded individuals could see relevance in your feedback and upvote it. Have a great one and take care!

    Russell

    1
  • Rebeca

    Thanks for the answer Anne Ronalter.

    Jennifer Rowe where can I find more information about this script? we work with some developers, and I could bring this up with them.

    Thanks in advance!

    1
  • Tammy Nasu-Salguero

    Many headings of different levels (1 to 3) in articles are not appearing in the Heading tab for me either. 

    1
  • Aaron Miller

    That is fantastic, thank you so much!

    0
  • Dganit Rauchwerger

    Hey everyone, this was working for me for a few days and today again, no luck - I don't see my headings again...

    Very frustrating. Are others experiencing the same?

    0
  • Casey

    Hi Zendesk Support/Community,

    Headings are no longer appearing as linkable when writing articles. Please see screens below. Any ideas?

    0
  • Amy Gracer
    Community Moderator

    @...

    You can link to an article manually: Go to the section to which you want to link, and then copy the URL out of the address bar.

    Then edit the article in which you want to insert the link. 

    Click the Link tool, and then on the URL tab, paste the URL you copied, and then type the text of the link.

    0
  • Dave Dyson

    Hi Shawn,

    Yes, that is as-expected. When you change the name of an article, it's probably a good idea to search your help center for references to it so you can change them. I'm sorry there isn't an easier way to do it that I'm aware of.

    0
  • Megha Joshi

    A hashtag appears at the end of every Heading 2 link we insert -- does anyone know why? This occurs regardless of whether it is linked/unlinked, viewed as an agent/admin or end-user.

    0
  • Shawn Miller
    If I tag another article and later change its title, the title does not reflect in the one I tagged it in.

    For example:
    Article A links "See: Article B" but I later re-name Article B to Article C, I would need to go back to Article A and update the link.
     
    Is that correct?
    0
  • Dave Dyson

    Hi George -

    Sorry I was unclear! Your end-users won't see that arrow, as they don't have access to the tools it's hiding. As an example, here's what I see when I go to the Inserting links in articles bookmark on this page:

    As you can see, the dropdown is obscuring the section header. When I click the arrow to minimize the toolbar, I can still see the header, but the arrow is still there just like in your most recent screenshot:

    But that's still because I have the permissions to edit the article – the arrow is there to allow me to reveal the links to add and edit articles. But end-users don't have those permissions, so they won't see the arrow at all. Here's what it looks like when I go to that bookmark when I'm not logged in:

    No unsightly arrow now! Hope that helps clarify things :)

    0
  • Ryan McGrew
    Zendesk Product Manager

    Hey All,

    I've escalated this to a ticket for the team to investigate as this appears like a bug. 

    Thanks!

    0
  • Giuseppe
    Zendesk Customer Care

    Hi Dganit,

    I understand this can be frustrating. I've tested this on multiple accounts but I'm not able to replicate the issue. Adding a link to heading seems to be working properly:

     

     

    Since this has worked before, and only stopped working recently, we may want to ensure that this is not a browser-caused issue by following the steps in this article - Options to clear cache and cookies.

    0
  • Ryan Boyer

    We've noticed the following behavior when using the Help Center article tab in the Insert/edit link feature.

    Articles will only display if you are part of the Managed by permission group of that article. If there is an article with a Managed by permission of group which you are not a part of, then the article will not display. This occurs even if you are part of the permission group for the Visible to setting. Is this expected behavior? In the scenario I outline, you can still insert the link to the published article by copying and pasting the URL; however, in my opinion, you should still be able to use the Help Center article tab to link to the article as well.

    0
  • Rebeca

    James Rodewig I was looking into this code, for translations, we use the tool Lingpad to pull the content, translate and then push the content back to Zendesk Guide, would this code be applicable for something like this?

    Thanks in advance!

    0

Please sign in to leave a comment.

Powered by Zendesk