Inserting and editing links in articles

Return to top

62 Comments

  • 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
  • Milan Wack

    Kristina Tibbitts
    In our case, it is up and running again. (Maybe give it a new try :-) )

    0
  • Nancy Scanlon

    We are also experiencing this, and we must have TOCs in the top of our articles. (VERY frustrating that we cannot use a proxy TOC, but that's another story for another day.)

    Can someone from ZD please respond with an update as to when we can expect a fix for this issue?

    0
  • 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
  • Milan Wack

    Zendesk Devs

    0
  • Casey

    Hey Y'all - Looks like the bug is fixed. Was able to create and link to headings on a fresh article this morning.

    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
  • 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
  • Dganit Rauchwerger

    HiGiuseppe, things seem to be fine now. Thanks for your assistance.

    0
  • Janine Deegan

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

    2
  • Jupete Manitas
    Zendesk Customer Care

    Hi Janine, thanks for writing in! I see that you would like that "Open in a new tab" to be defaulted On. Unfortunately, this is something created natively and we don't have the settings in our admin to make it default as selected. However, you can post a product feedback in our Guide about this. Here is our link forGuide - Product feedback. Thank you!

    0
  • Tommy Nicholls

    你好,我想知道,如果我更新的标题n article, do I have to manually update all the links to that article elsewhere in the knowledge base? In this instance, the links are in a "See also" Section at the bottom of articles, and the "Text on Link" is the title of the article.


    Thank you for your time.

    0
  • Brett Bowser
    Zendesk Community Manager
    Hey Tommy,

    如果你更新文章标题然后他们应该lso be updated when viewing all articles within a section as well. That being said, if you referenced an article by title in another article then those would need to be updated manually.

    Let me know if I'm misunderstanding your question!


    0
  • Rebeca Hernandez

    Hello, do you have any best practices for adding links to articles and then managing translations?

    We have translated more than 100 articles and had to spend a lot of time checking article by article and manually changing the links to the correct language.

    Any input is appreciated, thanks!

    0
  • Anne Ronalter
    Zendesk Customer Care
    Hi Rebeca,

    Thank you for your Feedback on that.

    Natively this is unfortunately not possible, but as a workaround, you can use Google Analytics for finding broken links to deleted pages:
    https://support.zendesk.com/hc/en-us/articles/4408883297690#topic_ys2_rr3_gn
    0
  • Jennifer Rowe
    Zendesk Documentation Team

    HiRebeca Hernandez

    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
  • Rebeca Hernandez

    Thanks for the answerAnne Ronalter.

    Jennifer Rowewhere 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
  • Jennifer Rowe
    Zendesk Documentation Team
    Hi Rebecca,
    We haven't published anything about the script we use and I don't know anything more about it.

    The person on our team who created the script is currently on leave, but I'll ask him to provide more info if he can when he's back. That won't be until next month though. Sorry for the wait!
    0
  • 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 ourUsing the Help Center API to manage article translationsarticle 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 coversuploading 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 witharticle['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

    打印(f - {articl发布翻译文章e_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.comis written ashttps://example.zendesk.com.zendesk.com). I fixed the typo in the script above and will update the article shortly.

    I hope that helps!

    2
  • Rebeca Hernandez

    James Rodewigthis is great, thank you so much for the help.

    0
  • Rebeca Hernandez

    James RodewigI 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
  • James Rodewig
    Zendesk Documentation Team

    Hi Rebeca,

    Unfortunately, I'm not familiar with Lingpad or how they push translations to your help center.

    However, you can use the following Python script to update links in translated articles once they're in your help center (likely after Lingpad pushes the content):

    import requests

    auth = ('your_email', 'your_password')
    subdomain = 'your_zendesk_subdomain'
    article_ids = ['1', '2'] # Article ids to update

    # Get a list of locales for the help center, excluding the default locale
    url = f'https://{subdomain}.zendesk.com/api/v2/help_center/locales'
    response = requests.get(url, auth=auth).json()
    locales = response['locales']
    default_locale = response['default_locale']
    locales.remove(default_locale)

    for article_id in article_ids:
    for locale in locales:

    # Get the translation for the article
    get_url = f'https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations/{locale}.json'
    get_response = requests.get(get_url, auth=auth).json()
    translation_body = get_response['translation']['body']

    # Update help center links in the translation
    print(f'article {article_id}: Updating links for {locale} translation')
    put_url = f'https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations/{locale}.json'
    translation_body = translation_body.replace('/hc/' + str(default_locale), '/hc/' + str(locale))
    data = {'translation': { 'body': translation_body}}
    requests.put(put_url, json=data, auth=auth)


    Unlike the previous script, this one doesn't require a JSON file containing the translations. Instead, you just need to replace theauth,subdomain, andarticle_idsvalues at the top of the file with your own values.article_idsshould contain the list of article ids you'd like to update.

    I suggest trying this script out with a test article (or even a test account) before using it in production or on a larger scale.

    Please also note that we can't guarantee the above code or provide support for the script. However, I hope it's enough to get you started and help you explore the Help Center APIs on your own.

    Best of luck!

    0
  • Stuart Buddrige

    Hi,

    Is it possible from a Category page to link to another section page that is not in that Category?

    For example, imagine I had 2 Categories called Desktop and Mobile. Under Mobile I have Android and iOS. When I select the Desktop link, is it possible to have a direct link to the Mobile Category page in there, or it's sections (Android and iOS), as opposed to having to go back and select the initial Mobile page itself?

    I don't want the link to be in an article - just a header section itself if possible like my attached mock up.

    The use case here is we have multiple sections across our site for one product and we are wondering if it's possible to have links to all these sections on one single page without having to create the sections themselves on that specific page.

    Thanks,

    0
  • Stuart Buddrige

    I can't attach my mock up for some reason.

    0
  • Christopher Kennedy
    Zendesk Developer Advocacy
    Hi Stuart,

    It's definitely possible to do this within thecategory pagetemplate. To do so, use theif helperto check the current category and conditionally render a link to the other category. For example, the following does this in your Desktop or Mobile example:

    {{#is category.name 'Desktop Category Name'}}
    Mobile Category Name
    {{else}}
    Desktop Category Name
    {{/is}}


    0
  • Movell Sarran

    Can you insert Guide articles easily into Agent Live Chats?

    1
  • 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
  • Christophe A.
    Hi Megha, thanks for your question

    I've just checked with the default Copenhagen theme and there is no hashtag for me.
    It's probably related to your theme. I would recommend to check the CSS file on this one. You can temporarily switch to the default theme to confirm that it is related to your theme.

    Movell, you can enable the article recommandations in the Classic widget (Enabling Article Recommendations in Web Widget (Classic)).
    If your question is more how an agent can easily insert an article link, the best option is ourKnowledge Capture app(available for Chat sessions in Agent Workspace).

    Hope it helps :-)
    0
  • Movell Sarran

    Can you insert Guide articles easily into Agent Live Chats?

    0
  • Christophe A.
    Hi Movell, the solution mentioned above works only with Agent Workspace (Migrating to the Zendesk Agent Workspace).
    If your instance is configured with the standard agent interface, I'm afraid there is no option to easily insert links to the guide (except copy/paste the links).
    0

Pleasesign into leave a comment.

Powered by Zendesk