Question
Can I edit the error page in Help Center?
Answer
Yes, select Guide admin > Customize design icon () > View theme > Edit code (
) and select the Error page template.
Keep in mind that this only allows you to edit the error page within Help Center. During a service interruption when Help Center may be inaccessible entirely, a green "oops" screen appears. This page is not editable at this time.
11 Comments
How can you edit the text that appears as a result of the inclusion of e.g. {{t 'nonexistent_page'}}? Is it possible?
Hi @Sarah,
You can simply replace the component with TEXT you want to show so that, your code will look like <h2>TEXT</h2> from <h2>{{t 'nonexistent_page'}}</h2>.
If you are on Professional or Enterprise plan then, you can also use dynamic content in place of TEXT.
Thanks
I have a Swedish Zendesk. Am I not able to edit the text at the root? I.e. go to the place where the "nonexistent_page" variable and the "mistyped_adress_or_moved_page" variable are defined and edit their texts there?
Our current text is not optimal.
Hello Robert,
You should be able to edit this as well on your en by navigating via the following route.
guide manager > themes > select the theme to edit > edit code > error_page.hbs
I've also included an article that goes into detail on how to make changes to your Help Center.
Customizing your Help Center
Best Regards!
But my error_page.hbs looks like the code below. Where do I edit the "<p>{{t 'mistyped_address_or_moved_page'}}</p>? i.e. the content of mistyped_address_or_moved_page?
<div class="container-divider"></div>
<div class="error-page">
<h1>{{t 'oops'}}</h1>
{{#is error 'unauthorized'}}
<h2>{{link 'sign_in'}}</h2>
{{/is}}
{{#is error 'forbidden'}}
<h2>{{t 'not_authorized'}}</h2>
{{/is}}
{{#is error 'not_found'}}
<h2>{{t 'nonexistent_page'}}</h2>
<p>{{t 'mistyped_address_or_moved_page'}}</p>
{{/is}}
{{#link 'help_center'}}
{{t 'back_to_homepage'}}
{{/link}}
</div>
Hello Robert,
You cannot change the value/translation of mistyped_address_or_moved_page, so if your help center is just Swedish, I would just replace the whole '{{t 'mistyped_address_or_moved_page'}}' part with a text of your liking.
With kind regards,
Sebastiaan
Sparkly ⭐
P.S.
In case you need a 'translatable' value, let me know. Then I'll propose another solution.
Hi, can I display a different error page based on user role?
So some form of "IF User_Role = Anonymous... ELSE..."
Hey Thomas,
You should be able to. Here's a Zendesk article on how to hide/show content based on roles.
Hope that helps!
Thanks Dan! I managed to work that bit out. The content I want to show is a link to a search for the same article on a different wiki (we're trying to compare and consolidate, so I want to add the link to help us switch between the two quickly without manually having to look up the other article).
I tried `<a href=https://{URL}/wiki/search?&type=page&title=true&text={{article.title}}>`, but it retains the spaces in the {{article.title}}, so the link only includes the first word of the title. I can't use {{article.slug}} or add `url_encode` or anything to the object.
Is there a way to do this? Could I assign the value of the {{article.title}} to a variable and url-encode that?
Hi Thomas,
As you've discovered there's no {{article.slug}} or {{url_encode}}. You're right that assigning to a variable is the way to go.
In your article_page.hbs template you could add f.e.:
...then in your scripts.js file:
Note that just appending "&text=" like that is a naive approach to modifying URLs. There are Javascript libraries out there to do it properly but that's out of scope for this comment.
Hope that helps!
Thanks for the reply Simon, that did the job. Cheers.
Please sign in to leave a comment.