您可以创建自定义页面from scratch and then link to them from anywhere in your help center or from any other web page or application. For example, you can use custom pages to create special landing pages for your help center, or even create new pages to embed content from sources outside of Zendesk.
This article covers the following topics:
Creating custom pages
您可以创建自定义页面in one of two ways. You can either create and customize a page using the Zendesk Curlybars and HTML markup within Guide's theming editor, or you can create and develop the page outside of Zendesk and then import it as part of a theme into the help center.
You can create up to 100 custom pages.
To create custom pages using the theme editor
- In Guide, click theCustomize designicon () in the sidebar.
The Themes page opens.
- ClickCustomizeon the theme that you want to edit.
- ClickEdit code.
- ClickAdd new, then selectCustom page.
- ForPage name, enter a filename for your page.
The name becomes part of the page URL.
- ClickCopynext to the URL field to save the URL to your clipboard.
You’ll need it to add the link to other pages.
- ClickAdd custom page.
The custom page appears without content and is listed under the custom_pages section in the sidebar.
To design the page, seeDesigning custom pages.
To create custom pages using code
As a developer, you can build themes offline and upload them as a ZIP file or use a GitHub repository. To create custom pages using code, create the page as a .hbs file in the following directory: templates/custom_pages. SeeWorking on a theme locally.
Designing custom pages
When you create a custom page, the page is blank. To design a custom page, you can use the Zendesk templating language, also known as Curlybars, as well as HTML, CSS, and JavaScript.
For more information, see the following templating language references:
Linking to custom pages
Your content hierarchy is composed of a number of different pages such as sections and topics that make up your help center. Custom pages exist outside of this hierarchy and are not visible to users until they click a direct link to them.
For example, if you create an “About Us” custom page, you can add a link to that page from any help center template, article, or even home page. Users visiting those pages can click the About Us link to view the custom page. If users don’t have access to a link that points to the page, they can still search for it.
The URL of a custom page follows this pattern: "https://{domain_name}/hc[/{locale}]/p/{page_name}". The locale is optional and the page name does not include an .hbs or .html file extension. You can get the page_name from the list of pages in the theme editor. See Creating custom pages.
For example, if your domain name is mondocam.zendesk.com and the page name in the theme is about_us.hbs, the URL will be https://mondocam.zendesk.com/hc/p/about_us.
If you want to insert a link to the custom page in another page or template in the same help center, you can use a relative link such as About Us.
44 Comments
Why is {{#if signed_in}} not working in custom hbs, like it does in all the other hbs templates?
Are there other helpers which does not work?
Tetiana Gron
This is so infuriating. We are a small business and was hoping to use custom pages in our HC to get around some of the limitations of the guide, namely being able to display custom content for our logged in users such as their purchase history of custom objects. Unfortunately we have no need for 90% of the enterprise features and simply cannot warrant doubling the cost of our instance to move from Growth to Enterprise just to enable this. Our only choice now would be to try and hack this with articles but its certainly not as nice...
add Custom page doesn't allow to upload .html file then how we can create a custom page in html instead of .hbs?
Jennifer Rowe
HiRajanthe file format of Help Center theme templates including custom pages is .hbs which is the files we input in our serverside rendering engine. In the .hbs files you can use HTML, JS, CSS, Curlybars etc.; what is rendered to customers is an HTML page.
So if you have written a custom page as an HTML document in a theme you want to upload, all you need to do is to rename it to a .hbs file.
If your theme is already uploaded you can just create a blank custom page and paste all the HTML code and save it.
Gorka Cardona-LauridsenWhat about the assets linking? Where should I upload them and How to access them?
Please accept my apologies
Could you please double-check your account rights? Ideally, you should be the admin/account owner for these types of changes.
Also, I realized that you have multiple accounts, it would be worth knowing for which account you have configured the changes.
Thanks
I have a question is it possible to create a custom page lets call it "categories" and in this I display all categories like in the basic template? We do not want to display the categories > sections > articles on the starting page but as mentioned in a sub page. Can you confirm that this is (not) possible? As far from what I have read is that I cant access any object within a custom page, but this seems quite a limitation I think
Hello,
I have searched throughout the guide and have not found an answer to my question. My issue concerns customizing pages, as I would like to display a Custom Field on my page. Is there a way to do this? If so, do you have a link that can help me accomplish it?
I'm certain that it's not natively available. You can also look intoHelp center JavaScript cookbookmaybe it can provide something useful to your use case.
You might be able to cobble something together making API requests to fetch custom field data, but that's custom code and wouldn't be something we'd support.
Hello,
I hope someone can help me here, looking to add custom forms to a custom page.
Is this something that we can do?
HiMichael Sutcliffe,
It's definitely possible. Any more details you can give?
We are basically looking to take an exisiting form and place it into a custom page. This seems like a crazy thing for us to want to do, but we have an Internal KB that has 2 forms that our Internal Staff use.
We want to be able to embed the form into SalesForce for them, but without them having to login to the Internal KB each time. We wanted to pull the form into the Main KB but under a Custom page so that it cant be searched for.
Whats the best way to do this?
Adam
I must agree. I endeavored to make a nice splash page for outages and system status but for doubling our monthly billing, no shot. Our company are legacy subs since 2012 and it's sad we can't have at least 1 or 2 measly custom pages for our patronage.
Pleasesign into leave a comment.