Help center content is organized in a Home > Categories > Sections > Articles structure. With default functionality, a section can only be in one category, and an article can only be in one section.
However, you can display a link to a section or article on the page you'd like them to be available by customizing the template for that section or category. Use the is
property in the code to display the content in an additional section or category.
To do this, you need the ID of the section or category. Find the section or category ID at the end of their URL. For example, this article is published in the category: https://support.zendesk.com/hc/en-us/categories/4405298745754
. The category ID is 4405298745754
.
This article contains instructions for the following.
- Adding an article to a section
- Adding a section to a category
- Adding an article to a category
- Adding an article to an empty section
- Adding a section to an empty category
Adding an article to a section
- In Guide, select Guide admin.
- Click the Customize design icon (
) in the sidebar.
- From the theme you want to work with, click Customize.
- Click Edit code.
- In the template editor, under Files, open section_page.hbs.
- Place the code below the
<ul class= "article-list">
element, which belongs to the{{#if section.articles}}
helper.
{{#is section.id ######}}
<a href="article URL without the text slug">Title of the article</a>
{{/is}} - Click Publish.
Adding a section to a category
- In Guide, select Guide admin.
- Click the Customize design icon (
) in the sidebar.
- From the theme you want to work with, click Customize.
- Click Edit code.
- In the template editor, under Files, open category_page.hbs.
- Place the code below the
<div id="main-content" class="section-tree">
.
{{#is category.id ######}}
<a href="section URL without the text slug">Title of the section</a>
{{/is}} - Click Publish.
Adding an article to a category
- In Guide, select Guide admin.
- Click the Customize design icon (
) in the sidebar.
- From the theme you want to work with, click Customize.
- Click Edit code.
- In the template editor, under Files, open category_page.hbs.
- Place the code below the
{{#each sections}}
helper.{{#is id ######}}
<a href="article URL without the text slug">Title of the article</a>
{{/is}} - Click Publish.
Adding an article to an empty section
To add an article to an empty section, the workflow is different because the code incorporates the else
/if
statement that displays an empty link within the section.
- In Guide, select Guide admin.
- Click the Customize design icon (
) in the sidebar.
- From the theme you want to work with, click Customize.
- Click Edit code.
- In the template editor, under Files, open section_page.hbs.
- Replace the code that goes from
{{else}}
to{{/if}}
with the code below.
{{else}}
{{#is section.id ######}}
<ul class="article-list">
<li class="article-list-item">
<a href="article URL without the text slug">Title of the article</a>
</li>
</ul>
{{else}}
<i class="section-empty">
<a href="{{section.url}}">{{t 'empty'}}</a>
</i>
{{/is}}
{{/if}} - Click Publish.
Adding a section to an empty category
To add an article to an empty category, the workflow is different because the code incorporates the else
/if
statement that displays an empty link within the category.
- In Guide, select Guide admin.
- Click the Customize design icon (
) in the sidebar.
- From the theme you want to work with, click Customize.
- Click Edit code.
- In the template editor, under Files, open category_page.hbs.
- Replace the code that goes from
{{else}}
to{{/i}}
with the code below.
{{else}}
{{#is category.id ######}}
<section class="section">
<h3 class="section-tree-title">
<a href="section URL without the text slug">Title of the section</a>
</h3>
</section>
{{else}}
<i class="category-empty">
<a href="{{category.url}}">{{t 'empty'}}</a>
</i>
{{/is}} - Click Publish.
39 comments
Yoni Hubermann
I am trying to use the syntax below in a category template, unsuccessfully. I am unsure where in the page HTML, I should place it. Can someone share an example?
0
Rad
It looks like my colleague is already working with you on a ticket with the same query. Please respond to the existing ticket 😊️
Thank you.
0
Mike Averto
Is it possible to access the "category" object on an "article" page template?
I keep getting errors in the code editor saying I can't access "category". Is there a workaround for this?
1
Bryan Funk
This does not work.
0
Nicole Saunders
Hi Bryan,
Can you provide any additional detail about what you're seeing, what you've tried, etc? We aren't sure how to help troubleshoot without a little more info.
0
Heather Firth
How can I reference two ids to use the same image? This doesn't work and I don't know the right syntax.
<!--2022-->
{{#is id 1##### 2#####}}
<img src="{{asset '2022.png'}}"/>
</a>
{{is}}
0
Tipene Hughes
Hey, Heather Firth !
The #is helper only allows for two parameters to be present so to have two separate IDs reference the same image, you’ll just need to split the IDs in to two separate #is statements:
I hope this helps! Let me know if you have any questions.
Tipene
0
Derek Hixon
I was able to add an article to a section ok, however, the article doesn't show up on the category page so am now trying to also add the article to the section on the category page and am using the below code.
Is this correct, and more importantly, where would I place this? Thanks!
0
Tipene Hughes
Hi Derek Hixon,
The code looks good to me! You'll want to place that in the category_page.hbs file within the {{each #sections}} helper, which sits below the div with the ID "main-content".
1
Derek Hixon
Thanks Tipene Hughes all set now, cheers!
0
Permanently deleted user
hi!
We are trying to display one article across several sections in Zendesk. We're using this community article to add code to our theme.
We successfully got an article to show up under another section in our zendesk sanbox tenant (see attached), but we can't get the article to also show up on the category page under that section.
Test Case
Original Article Placement:
- Category:Working at Twitch
- Section: Recruiting
DUPLICATE SHOWINGS using Code
On Section Page - SUCCESS:
- Category: Manager Toolkit
- Section: **Create and Manage Headcount
Added the following code to section_page.hbs, line 48:
{{#is 360010025532}}<a href="https://twitchpeople1568844680.zendesk.com/hc/en-us/articles/360048464891">Who is my Recruiter?</a>
{{/is}}
Under Section on Category page - FAIL
Added the following code to line 44 of the category_page.hbs
{{#is id 1568844680}}
<a href="https://twitchpeople1568844680.zendesk.com/hc/en-us/articles/360048464891">Who is my Recruiter?</a>
{{/is}}
TL;DR: The code successfully made the article appear on the category page but not under a section, we want it to appear under create and manage headcount. It does appear there when you open that section page.

0
Greg Katechis
Hi Rachel! To see what might be going on, I'll need to take a look at your account. I'll open up a private ticket so that we can continue this discussion without sharing any account info here. Talk to you shortly!
0
Kyle Gilbert
EDIT: I've got this figured out to display in the category and section when you actually click into the category and section, but it doesn't show in the accordion drop down on the Home page. I'm still messing with this but any help would be appreciated.
If needed, is there any way to get a ZD Developer Advocate to get on a Zoom with me and walk me through some things via screen share?
EDIT #2: Figured it out. You have to put the same code on the home_page.hbs under the {{#each section}} helper. Play around with putting it under different areas to get it to display how you want.
Here is my code for Sections:
Here is my code for Categories and Home page:
Notice I took the <li> out to take out the bullet point, as that's our style.
0
Brett Bowser
Can you share a little bit more on what you're trying to set up? Our Advocates are unable to support custom code so if you're looking for some help customizing your Help Center then we'd most likely need to get you in touch with our Professional Services team.
Otherwise if you create a post in our Zendesk Suite Q&A with what you're trying to set up then some of our experienced community members can jump in and point you in the right direction :)
Let me know!
0
Jacob Smith
Hi Team,
We're currently trying to display a single article in multiple sections. Using the "add an article to a section" code above, I've been able to get a link to the article appearing in another section (Example Article). However, I can't get it to appear in the format of the original articles in that section (Articles 1, 2 & 3).
Is there anything I'm missing here? It could be that I am not inserting the code in the correct location within the section_page.hbs! Any advice would be great!
0
Kaarina
Hi Jacob Smith
On our site, we have this code added between these lines in the section page:
But we also added the same class to these cross-posted links as the others, so they format the same.
<li class="article-list-item"> <a class="article-list-item__link"
Example:
0
Jacob Smith
Hi Kaarina,
Thanks for your response, I've had a go at what you have suggested above but haven't had much luck doing it this way. I don't seem to have the code below on the section page
Does anyone have any further advice on how I can display the same article in multiple sections?
0
Tipene Hughes
Hey Jacob Smith,
You'll need to ensure you have the correct class names applied to the appropriate elements for the styling to display correctly. Can you try adding the class name that you have on Articles 1, 2, and 3 in your previous comment to the Example Article link.
Let me know if you have any questions!
Tipene
0
hireEZ Support Team
Hi team,
I tried to add an article to multiple sections. I added the code suggested above to the section_ page. However, the article did not show up in another section. Where I should put the code?
0
Raphaël Péguet - Officers.fr
Hi,
I'd like to show in a custom page a list of article that got a certain tag can you provide the code to do it please?
Thank you,
Raphaël
0
Heather Firth
Did anyone manage to get it within the list? It throws an error if you put it within the each section. It works if you put it outside of it but it's not in the list.
0
Kyle Gilbert
Heather, make sure you're adding it in the right area of the code. That section id code looks right.
0
Joe Wong
I'm trying to have multiple sections link different sets of articles, but I haven't been able to get the second section to show anything. Where should I be placing my second set of {{#is section.id ###}} statements? I've tried several options but they either error out (like trying to put another {{else}} statement and replicating the first section) or they are able to be published but nothing changes.
0
Tipene Hughes
Hey, Joe!
You'll need to add the code to the section_page.hbs file in the guide admin code editor. The code should be within the <ul class=“article-list”> element, which is within the {{#if section.articles}} helper.
If you continue to run in to issues, please share your code here so we take a look in more detail.
Thanks!
Tipene
0
Kyle Gilbert
Tipene Hughes Can you show what this looks like on the Caterogy_page.hbs?
0
Tipene Hughes
Hey Kyle Gilbert,
Sure, here's an example of what it could look like if you were wanting to add an article to a section on a category page. The code should go below the {{#each sections}} helper which itself is below the div with the id “main-content”. You can add it where ever you like within the #each helper, but I’d suggest putting under the ul element with the class “article-list. The ul element is where all the other article links live so it’d make sense to have the article display underneath that on the page.
0
Kyle Gilbert
Tipene Hughes Super helpful! That works great. Thanks!
0
Joe Wong
Tipene Hughes Thanks, but I meant the second part of the article, when adding an article to an empty section. I can successfully add articles to a single empty section, but I couldn't figure out how to do it for another section in the same template.
This isn't the best example as I've tried different methods but hopefully it illustrates my problem. So the first {{else}} statement works while the second wouldn't show up in the respective section.id.
0
Tipene Hughes
Joe Wong thanks for the clarification!
Here’s an example that adds an article to three different sections. The first {{is}} statement contains a conditional {{else}}, followed by a new {{is}} statement for the next article, and so on:
0
Ana Calcano
I was able to add the article to another section, but we have many languages in our help center, and it appears now in the section of every language, always in English. I want it to appear in the corresponding language. Could you please advice?
1