Recent searches
No recent searches
How to include Article in Multiple Sections
Posted May 22, 2020
How to add an HC Article to multiple sections (using a redirect)
Zendesk level: Intermediate
Knowledge: Javascript, Guide Template Editing
Time Required: 10 minutes
Documentation, customizations, and troubleshooting on GitHub: https://github.com/Ajhad1/Zendesk-Customizations/tree/main/Guide/How-to-include-Article-in-Multiple-Sections
Based/Inspired by https://support.zendesk.com/hc/en-us/articles/217958367-Redirecting-traffic-from-deleted-Help-Center-articles
Use Case:
My company has many articles that fall under multiple sections. To avoid having to update duplicate articles, we have elected on creating redirect articles that lead to the "correct" article but still allow the article to be listed in the section.
How it works (simplified):
If an article ID is a label in an article, the article will be redirected to the article ID in the label.
How to Use It:
Once the code has been implemented, all that is necessary is for an article ID to be added as a label to the article.
Prerequisites:
- You must be using Zendesk Help Center.
- You must have access to the article_page.hbs file.
- Your customers must allow Javascript in their browser.
How to Install:
- Navigate to the Guide Admin Center to edit the themes.
- Add the code to the respective location within the appropriate tags. GitHub
- To test add an article ID to the tag of an article.
- That's it.
Notes:
- This is not a true duplicate or replication of data in the articles. It is simply a redirect to another article.
- There is plenty of validation that can be added for article IDs added to the label.
- This is more of a proof of concept than anything else.
- It does work as is but there may be issues if the labels are not validated and an invalid label is added.
- If anyone would like to add some validation or other code improvements, I have no issue with updating the article to reflect.
- Removed the need to manually adjust the code for the specific subdomain and language. It should pull the current language and subdomain for use in redirection.
Troubleshooting:
0
37 comments
Alejandro Colon
Gotcha. To do that create the article that you want to redirect to the original and add the original article's id to the labels.
When someone goes to the article the code will see that the label contains an article id and will redirect the end-user to the article.
0
Oren Ben Ami
Just to clarify:
Category: DRI
Section: Getting Started
Article: Building a Dashboard (ORIGINAL ARTICLE I CREATED)
I want to have the following:
Category: DMI
Section: Getting Started
Article: Building a Dashboard (A NEW ARTICLE I CREATE WITH NO CONTENT. I ADD THE ORIGINAL ARTICLES ID TO THE LABEL). So, when someone clicks that article, they will be redirected.
Is this correct? Also, do I have to put an article ID of over 200000000 in the original article?
0
Alejandro Colon
Yes, you are correct.
Also, You do not have to do anything to the original article.
0
Oren Ben Ami
Works perfectly! Thanks so much!
0
Alejandro Colon
No problem. Glad I could help. Have a great day.
0
Cheyenne
Hi Alejandro, thank you for this solution. While in my eyes it should be a basic option to place an article in different sections/categories and even different brand guides, it seems Zendesk doesn't seem to think that way. Unfortunately. Although the solution isn't the most perfect (breadcrumb wise), your solution helps us to at least have to direct information in only one article and direct our customers to one complete article. Joy!
0
Jacquelyn Redington
I keep getting this error. What am I doing wrong?
0