Suite | Growth, Professional, Enterprise, or Enterprise Plus |
Support with | Guide Professional or Enterprise |

Web-savvy Guide admins can work directly with the page code to build a customized theme for your help center. Customized themes can include:
- Editable templates that define the layout of each page (for example, article page, category page, or community topic page)
- Custom pages that you create from scratch and place anywhere in your help center
- Global header and footer for 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 and custom pages. You can also use the JavaScript and CSS files included with your theme to make site-wide changes to the appearance and behavior of the theme. If you are thinking about using your own HTML code to edit your help center theme, read Editing the source code of help center articles.
When you modify a theme's code (for example, its templates, JavaScript, or CSS), the theme
preview displays the </>
icon, indicating that the theme's code has
been modified and will no longer receive new features and updates.
This article covers the following topics:
Related articles:
Customizing page templates and custom pages with HTML and Curlybars
The HTML for the help center is contained in editable templates that define the layout of page types, custom pages, and a global header and footer. You can also use a full-featured templating language called Curlybars to create or manipulate content for these elements.
You can customize the template of any of the following page types or elements, or create your own custom pages.
- Custom pages (custom_page.hbs): custom pages that you create from scratch and link from anywhere in your help center
- 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 Knowledge admin, click Customize design
(
) in the sidebar.
- Click Customize on the theme you want to edit.
- Click Edit code.
- In the Templates section, click the template or custom page you want to
modify.
The page opens in the code editor.
- Use the code view to edit the template or page.
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 Localizing help center content)
- Embeddable widgets created by third parties
- HTML markup
-
Template expressions to display and manipulate content in your pages
- Click Save in the top right corner to save your changes.
If you edited a template, 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.
Note: When previewing a theme, all features may not work. The preview functionality is intended to show look-and-feel changes, but it is not intended for end-to-end testing of interactive theme functionality. We recommend you use a Sandbox for end-to-end testing.
- Make other code changes as needed, then click Save.
When you're finished editing the page template or custom page, 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 Knowledge admin, click Customize design
(
) 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 a
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}}
179 comments
Brooke Kitten
Currently, my section pages display 30 articles. I am admittedly novice with coding and don't really know exactly which code controls this. Where would I look to find it? I checked the section_page.hbs, but I'm not exactly sure what I need to look for/change to make it display all articles in that section, regardless of number.
0
Raúl
i'm trying to customize our zendesk guide theme. i've noticed there are certain elements which i cannot edit because they are being rendered with snippets. for instance, on an article page, the {{request_callout}} snippet is rendering the “Have more questions? Submit a request” prompt. how can i edit such snippets if i'm interested in changing the behavior of the <a> tag living inside that snippet? another example is the button in the user nav bar, which appears to be living in the {{user_info}} snippet which has all of the user menu stuff, including the button.
0
Growthdot
Hi community! You can count on GrowthDot If you have any difficulties with theme customizing or need a specific theme tailored to your website. Also, we have ready to use Zendesk Themes, or we can help you with any issue with your existing one.
0
Ashok Kumar Reddy Putta
Hi ,
We have added URL's as fields description for end user reference to visit / update templates (spreadsheets) ,and these Url's are currently visible to end users in help center portal .
however when they click on URL , and the URL is getting open in same tab.
Is there any way to open URL's in new tab.
I have tried this .js , and it is working in sandbox , but not working in production instance and i only see the version difference of portal
Regards,
Ashok
0
Tatiana Christensen
Hi, I hope this is the right place for this question and apologies if I missed the answer in the many comments!
How do we set up this “Articles in the series” feature. Is there a recipe for that?
We'd love this feature for a stronger presentation of advanced workflows or interconnected processes under one procedure. This would for us strengthen the help center as a tool for process documentation.
0
Omar Aborayan
Hi,
I have 2 questions here:
1- if I want to enable Gather for internal users only, the article advises removing the community links from the theme.
Now, could you let me know which links to be removed and how to remove them?
2- If we decided to keep the community for the public (external users), how can we manage the posts (internal and external)?
Thanks in advance :))
0
Julian Garcia
I am at a loss as to how to either add editable fields to the category or make the landing page for a category an overview article. Very much just like zendesk's own developer documentation:
https://developer.zendesk.com/documentation/ticketing/
Help is very much welcome
0
Tony
that's great to hear! Feel free to share your solution with the community if you feel like it!
Best,
0
Patrick Beebe
I've resolved this myself, CLose the ticket
0
Patrick Beebe
Our organization uses four ‘brands’ (example, tech support, office services, HR, and Finance). I removed the ‘submit a request’ option on the MAIN landing page, as this caused confusion for staff. Unfortunately, it removed the ‘submit a request’ option on ONLY ONE = office services. I've tried editing the code to reinstall on the header.hbs, but the page only displays a ‘hamburger’ and does not do anything.
So, WHY would it effect only one of the pages? WHY would it remove it in the first place?
here is the code:
<a class="skip-navigation" tabindex="1" href="#main-content">{{t 'skip_navigation' }}</a>
<header class="header">
<div class="logo">
{{#link 'help_center'}}
<img src="{{settings.logo}}" alt="{{t 'home_page' name=help_center.name}}" />
{{#if settings.show_brand_name}}
<span aria-hidden="true">{{help_center.name}}</span>
{{/if}}
{{/link}}
</div>
<div class="nav-wrapper">
<button class="menu-button" aria-controls="user-nav" aria-expanded="false" aria-label="{{t 'toggle_navigation'}}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-menu">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M1.5 3.5h13m-13 4h13m-13 4h13"/>
</svg>
</button>
<nav class="user-nav" id="user-nav">
{{link 'community'}}
{{link 'new_request' class='submit-a-request'}}
</nav>
{{#if signed_in}}
<div class="user-info dropdown">
<button class="dropdown-toggle" aria-haspopup="true">
{{user_avatar class="user-avatar"}}
<span class="hide-on-mobile">
{{user_name}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</span>
</button>
<div class="dropdown-menu" role="menu">
{{link "my_activities" role="menuitem"}}
{{my_profile role="menuitem"}}
{{change_password role="menuitem"}}
{{link "sign_out" role="menuitem"}}
</div>
</div>
{{else}}
{{#link "sign_in" class="sign-in"}}
{{t 'sign_in'}}
{{/link}}
{{/if}}
</div>
</header>
0
Sign in to leave a comment.