More web-savvy Guide admins can work directly with the page code to build a customized theme for your help center. The code is contained in editable templates that define the layout of each page type, as well as the global header and footer of the help center. You can also use a full-featured templating language called Curlybars to access help center data and manipulate the content in page templates. Special templates let you add JavaScript or customize the CSS.
This article covers the following topics:
Related articles:
Customizing the page templates with HTML and Curlybars
The HTML for the help center is contained in editable templates that define the layout of each page type, as well as the global header and footer. You can also use a full-featured templating language called Curlybars to access help center data and manipulate content in page templates.
You can customize the template of any of the following page types or elements:
- Article page (article_page.hbs): the individual article pages in the knowledge base
- Category page (category_page.hbs): landing pages
- Community post list page (community_post_list_page.hbs)
- Community post page (community_post_page.hbs)
- Community topic list page (community_topic_list_page.hbs)
- Community topic page (community_topic_page.hbs)
- Contributions page (contributions_page.hbs): the lists of posts, community comments, and article comments by an end-user
-
Document
head
(document_head.hbs):
the document's
head
tag - Error page (error_page.hbs): the message displayed when a user lands on a non-existent page
- Footer (footer.hbs): the bars appearing at the bottom of all help center pages
- Header (header.hbs): the bars appearing at the top of all help center pages
- Home page (home_page.hbs): the top-level landing page for your help center
- New community post page (new_community_post_page.hbs)
- New request page (new_request_page.hbs): the request or ticket submission form
- Request page (request_page.hbs): the individual request or ticket pages
- Requests page (requests_page.hbs): the lists of requests or tickets assigned to a user or that a user is CC'd on
- Search results (search_results.hbs): the search results display format
- Section page (section_page.hbs): landing pages
- Following page (subscriptions_page.hbs): the list of categories, sections, and articles a user is following
- User profile page (user_profile_page.hbs)
To edit the page templates
- In Guide, click the
Customize design icon (
) in the sidebar.
- Click the theme you want to edit to open it.
- Click Edit
code.
- In
the Templates section,
click
the template
you
want to
modify.
The page opens in the code editor.
- Use the code view to edit the template.
You can add, remove, or reorder any the following:
-
Template
expressions to display and manipulate content in your
pages
For example, the breadcrumbs template helper
{{breadcrumbs}}
displays a breadcrumb navigation element on a page. For a detailed guide on template expressions, see Help center templates. - Dynamic content placeholders, (see Adding translated text)
- Embeddable widgets created by third parties, (such as the Twitter search widget)
- HTML markup
-
Template
expressions to display and manipulate content in your
pages
- Click Save in the top right
corner
to
save your changes.
The changes are applied to every page in your theme that is based on the template you modified.
- To
preview your changes, click Preview,
see
Previewing your theme
in the
help
center.
- Make
other code changes as needed,
then
click
Save.
When you're finished editing the page template, you can close it.
Customizing the CSS or JavaScript
You can add JavaScript code or customize the site's CSS. For a taste of the things you can do in the help center with a little bit of coding, check out the following resources:
To customize the CSS or JavaScript
- In Guide, click the Customize design icon (
) in the sidebar.
- Click Customize on the theme you want to edit.
- Click Edit
code.
- Click script.js to modify the JavaScript or style.css to modify the
CSS.
The file opens in the code editor.
- Add or modify the JavaScript or CSS in the code view.
- Click Save in the top right to save your changes.
The changes are applied to your theme.
- To preview your changes, click Preview,
see
Previewing your theme
in the
help
center.
- Make other code changes as needed, then click Save.
When you're finished, you can close the file.
Using variables in CSS and HTML
The properties you choose in the Settings panel or set in your manifest file for colors, fonts, and theme images are stored in variables. You can use these variables in the theme's style.css file. You can also reference the variables using Curlybars expressions in HTML page templates.
The variables are useful if you want to specify the same value in several places and update it quickly. Updating the property updates it everywhere the variable is used. The default Copenhagen theme includes some variables for colors and fonts. You can change the names and labels, delete variables, or add your own, see the Settings manifest reference.
In the standard Copenhagen theme, you have the following variables by default:
-
brand_color
is the brand color for major navigational elements -
brand_text_color
is the brand color for hover and active states -
text_color
is the text color for body and heading elements -
link_color
is the text color for link elements -
background_color
is the background color of your help center -
heading_font
is the font for headings -
text_font
is the font for body text -
logo
is the company logo -
favicon
is the icon displayed in the address bar of your browser -
homepage_background_image
is the hero image on the home page -
community_background_image
is the hero image on the community topics page -
community_image
is the image for the community section on the home page
Examples using variables in CSS
The properties you set for colors, fonts, and theme images are stored in variables that you can use in your theme's style.css file.
For example, you can use some of the default variables in CSS with the following syntax:
-
$brand_color
-
$brand_tex_color
-
$heading_font
-
$text_font
In the CSS file, you assign a variable to a CSS property the same way you would assign a normal value. For example:
.button {
label-color: $text_font;
}
You can also use single curly brackets to embed the helper in a CSS expression, as follows::
max-width: #{$search_width}px
Examples using variables in Curlybars in HTML
The properties you set for colors, fonts, and theme images are stored in variables that you can reference with Curlybars expressions in HTML page templates.
The
variables become properties of the settings
object in Curlybars. As with
any Curlybars object,
you
can
use
double curly brackets and dot notation
to insert
an
property in a page template.
For example:
-
{{settings.color_1}}
is the HEX value of a color. For example:#FF00FF
-
{{{settings.font_1}}
is the font stack. For example, system is defined as:'-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"
-
{{settings.homepage_background_image}}
is the path to the file stored in this field. For example:p8.zdassets.com/theme_assets/...
-
{{settings.range_input}}
is the value of the range input.
The settings object can be used as input to any helper. For example:
{{is settings.enabled}} ... {{/is}}
149 Comments
Hello Mihaly,
If you want your end-users to be able to add their phone number from the registration form in your Help Center, you can use a custom field for this. You can add custom fields to users under the Admin icon in the sidebar, then select User Fields and make sure that you set it to Editable for end-users and Required to submit request. This will require your end-users to add phone numbers.
Hi,
I want to change the Spanish text due to overlapping, not sure how can I do it on our custom theme. I was able to find the English version, but no idea how to locate the other language we support. Any help will be appreciated
Hello Pedro Reis
I've done a bit of investigation and have a couple things that should help!
First, there is not a different location for the different languages. The way it works is the string is written in english and putting the "t" in front of it means "translate this". So having the "t" in front of the string will make it translate into your different languages automatically based on what language the customer is viewing your help center in.
Second, the string for "Usuarios a los que les pareció útil: 1 de 6", is not specifically written in the code unfortunately. It shows up as part of this string "{{vote'label' class='article-vote-label'}}".
The overlap issue you are seeing is likely actually the result of customizations to your CSS, rather than the article_page.hbs template. So either you could try and work with the custom CSS to fix the issue, or maybe consider removing the string entirely and not have that on your page as shown below. Or (if you have the coding abilities) remove that string and manually code in your own string. These all are just some general ideas though! Customization of code is beyond our realm of support so I can't really say what will work the best or how that will turn out. But hopefully that helps get you some options and on the right track!
The existing style.css file is extremely large (4,000+ lines of CSS).
How can we create a new stylesheet to keep track of our overrides in one convenient custom file?
Let's say we want to create a file called: override-styles.css
Where could we put that file and how could we place the stylesheet to run, after all other CSS?
e.g. would we put something like this in the /Head?
Hey Jordan,
You can try these steps:
Step 1 : Create custom_stylesheet.
Step 2 : Add that custom stylesheet in your assets folder.
Step 3 : Map that stylesheet on document_head.hbs or footer_page.hbs template as other libraries::
<link type="text/css" rel="stylesheet" href="{{custom_stylesheet.css}}" />
You can find your added custom stylesheet in your assets folder on your HC.
If that's not work after adding on document_head.hbs page then remove there and add on footer_page.hbs page.
I hope it will resolved your query :)
Thanks
Team
You nailed it Ifra Saqlain! Thank you so much for those step-by-step instructions!!
After uploading my file: doc-repo-custom-styles.css to the Assets folder, I saw these options:
So I used the $assets-doc-repo-custom-styles-css to replace this bit, in the snippet you provided: {{custom_stylesheet.css}}
So I simply added the following to my document_head.hbs file:
<link type="text/css" rel="stylesheet" href="$assets-doc-repo-custom-styles-css" />
––––––––––––––––––––––––––––––––––––
I have one other question...
I really wanted a solution that would allow me to manage my custom CSS the same way I'm able to modify the style.css file that's natively in my ZD theme.
Doing this method of adding an external .css file to my "Assets" folder is not quite ideal b/c I can't edit the CSS in the system. I can only edit the file externally, then "replace" the existing file.
So my question comes back to... can I create AND REFERENCE a custom CSS file, that is editable in ZD, like the original style.css file?
If not... then I wonder if there are other options like a github repo that auto syncs with the ZD and we can just keep our repo updated. ¯\_(ツ)_/¯
But again... i think the best solution would be to be able to natively mod the CSS in ZD.
First thing is you need add custom stylesheet like this on document_head.hbs template:
In the case of GitHub, I didn't try that kind of process as you explained above that update custom stylesheet by github but yes you should try that process and I'm sure that would work :)
How does this feature relate to Team level account?
On support pricing page I see Essential, Team, Pro, Enterprise, Elite - so where does this feature stand for Essential and Team? assuming Pro+ have access to it
Hey Dan. This is separate from the Zendesk Support plans (essential, team, pro etc). Guide is a separate product from Zendesk has its own package tiering. In this case, you need Guide Pro or Guide Enterprise, these are separate from whatever Zendesk Support package you have.
Hi,
Is there a way to change the localized term for 'request' in in Guide customer interface? In Dutch it's 'aanvraag', and it doesn't really suit our company/usecase. I figured this is not something that can be set in a theme, or is it?
Timo Klok
This article explains how to rename and translate default links in the Help Center, which I believe is what you're looking for.
Thanks Karen. I was hoping there was a single place where I could change the translation for "request", instead of having to change the text of all links seperately. But your suggestion will also work!
Hi Timo, the article also mentions using a dynamic content helper. In that case, you would have to change the text of all the links to use the dynamic content helper, but then you would need to put the translation in only one place, in the dynamic content helper.
Hi,
I want to have 2 different ticket forms presented to users at 2 different url's. Each form would also use a different theme (so that I can use different code). How can I do this?
Thx.
@ gil alvarez
This sounds like something you might want to look at the Multibrand feature for. You can have Guides with different URLs, code and form configurations
Hi,
Where do we upload images to customize the helpcenter's homepage ?
I would like to add pictos.on some buttons.
Hey Anais,
I was able to track down the following community tip that may help point you in the right direction: Adding Navigation Images to Help Center (with use of dynamic content)
You can also find a full list of useful Guide tips here: Guide community tips for Help Center
Cheers!
Hey Brett,
Thanks for your prompt assistance.
I feel dummy but I haven't found where and how to upload images yet in your links.
In Adding Navigation Images to Help Center (with use of dynamic content), it is written 'The images are hosted on our own server. ' and in another article titled 'Adding icons into your theme ', they are using Font Awesome CDN.
Do I have to understand that there's no possibility of uploading images to Zendesk server ? (Actually I uploaded images in an article visible only to agents, but apparently end-users don't see these images).
I wonder if I upload them via an article visible to end-users and put "display:none" in that article that would work...
Hey @... you might be looking for the "assets" folder...which took me forever to locate! lol
When you are editing your theme, you'll find it on the right sidebar. When you open it, you'll see a link to "Add asset" and that's how you upload an image. Then you can use that image for whatever purposes you need it.

If that's not what you're looking for...well maybe it will help someone else like me who was hunting all over tarnation for this simple option ;-)
Hey Marci,
Yes, yes, that was exactly what I was looking for !!!
And I was about to be desperate !
I find it crazy that it's written nowhere in Zendesk's documentation or so hard to find...
Thank you so much Marci !!!
I think you will be saving many people's time !
Awesome! Glad I could help :)
And I agree...sometimes the documentation of the simplest things seems to be missing. Yesterday I clicked through 3 different articles that had links to "see this article for how to do X" embedded in them, but never found that any of them actually showed me the steps to do X...they were all just explaining more about the concept, not the steps.
If the documentation team is listening...it would be great to have a whole section of the HC dedicated to just "how to" steps with screenshots :)
Hi!
Where can I edit the {{name}} expression? I'm looking at replacing every instance of "Request(s)" with "Case(s)". In the Requests page (requests_page.hbs), I see {{name}} being used to pull in My Requests and Requests I'm CC'd on. Ideally I'd like to change this to My Cases and Cases I'm CC'd on.
Is this possible by changing the {{name}} expression for the Requests Page or is there another method of doing so?
Hi Pablo Gomez, I don't think it's possible to change the value for the {{name}} helper. It's part of the Filters object and it also contains all the baked-in translations as well.
I think you have two options, one is to use javascript to change the text after the elements have been loaded (not ideal as there might be a slight delay as the name is updated). The second is to hard code the names of the filters rather than using the helper.
Hey guys,
Am I able to just start from complete scratch? Completely different layout, like, modify a base "template.hbs", and not just header. I want to access the head, complete body and stuff. Is that possible?
Hey Francis, editing the header is so simple. Go to the header.hbs template and start editing or you can share the screenshot here if I misunderstood your point.
Ifra,
I'm considering switching to the Copenhagen theme and customizing it but I'm concerned about having to migrate that customization to future versions of the theme. Is there a revision history for the theme documented somewhere or can you comment on how often it has been or expects to be updated?
Thanks
Hey Ken Billing,
The best way to follow updates is to fork the theme's github repository and use the github integration to import your customized theme.
Can anyone tell me where I would go in the Copenhagen theme to edit where it says Announcements Customer Connection and Tips & Best Practices on this page:
Hi,
My guess is that these are either article categories or community topics. If you go into your Guide Admin, you can click on Arrange Articles and you can see a list of all your Categories. If you click on Arrange topics, you can see your community topics.
Hope this helps!
Thanks,
Maggie
Please sign in to leave a comment.