최근 검색
최근 검색 없음
How to quickly add an outside (or non-helper) link in your header or other pages in your Guide theme
2018년 1월 22일에 게시됨
Sometimes it may make sense to provide a direct link to a category, topic or non zendesk page. Anything that is not a helper type link that Zendesk provides. In this example we'll include a simple html link in the header, but this can apply to other areas of he site as well. Don't worry! Even you know zero code this is super easy!
Here is the standard theme header with a few links. Let's add another one called "Other Category" which will link us to a specific category:
You'll need to get into your theme and edit it.
Next click on header.ebs as this is the file we need to edit:
In here you'll add a simple html link into the existing code as follows:
<nav class="user-nav" id="user-nav">
{{link 'community'}}
{{link 'new_request' class='submit-a-request'}}
<a href="https://yourcompanyname.zendesk.com/hc/en-us/categories/360000014392-Other" target="_blank">OtherCategory</a>
</nav>
Of course, make sure to change it to your actual company name and you'll need the html link to your category or section. You can do that by right clicking on your existing link and copy the URL. Or put in any URL for the link you want.
So now, this is what it will look like with a link in the header to your category: Simple!
If you want the link to open in another tab simply add the target="_blank" attribute:
<a href='https://yourcompanyname.zendesk.com/hc/en-us/categories/360000014392-Other target="_blank'>OtherCategory</a>
Here are some additional resources for getting started on editing your theme:
https://developer.zendesk.com/apps/docs/help-center-templates/introduction
0
댓글 6개
Jennifer Rowe
Great tip! Thanks for sharing this, David!
0
Nikolaj Zavalny
You have to shield the address that you want to link to with the quotes:
Otherwise, it'll try to got to yourcompanyname.zendesk.com/hc/en-us/categories/360000014392-Other/%20target= which obviously doesn't exist.
0
David Raboy
Thanks Nikolaj! Just updated the code. Didn't notice it earlier.
0
Michael Lorch
Hello Everyone!
How would one add an anchored header but have it display in multiple languages?
English is fine but the link is showing up only in English for all languages and want to fix this. Appreciate your help and time.
0
Dan Ross
Hey Michael,
You'd typically do this with Dynamic Content. Create the multilingual Dynamic Content in Zendesk and the setup the header. Instead of an English string, use the Dynamic content placeholder. Note that in Guide, you need to adjust the placeholders a bit. If your placeholder was {{dc.mikes-text}} in Guide you'd put {{dc 'mikes-text'}} in the Guide code.
Here's a link with some steps on how to use Dynamic Content to get you started.
0
mayan kopit
Hi, Thank you for the article - it was super helpful.
I have an additional question:
I have 2 environments:
1. us-platform.example.com
2. platform.example.com
I want to refer our customers to a link in our platform, however I want the customers that connected using
Platform.example.com to get to platform,example.com/help
AND us-platform.example.com to get to us-platform,example.com/help
Is there any way to do so?
0