Sometimes you don’t need the default Zendesk functionality and just want to redirect the user to another website when the logo/Sign in/ Submit a ticket links are clicked. In this case, the header template should be edited.
-
In Guide, click on the Customize design icon in the sidebar. The Theming center page opens.
-
Click the theme you want to edit to open it.
-
Click the Edit code button.
-
In your theme code configuration page under the templates directory, click the
header.hbsfile.
Changing the logo link
By default, we use link helper:
{{#link 'help_center'}}
<img class="lt-topbar__logo lt-flex-shrink-0" src="{{settings.logo}}" alt="{{t 'logo'}}">
{{/link}}
This helper wraps the logo. So if the user clicks on it, the Help Center homepage will open. You can link the logo to any other website by replacing a helper with an HTML link code:
<a href="YOU_CUSTOM_URL_HERE">
<img class="lt-topbar__logo lt-flex-shrink-0" src="{{settings.logo}}" alt="{{t 'logo'}}">
</a>
Now the logo will redirect the user to another page. It also works with Sign in/Submit a ticket links.
Changing Submit a ticket link
Replace the existing line:
{{link 'new_request' class='lt-btn lt-btn--topbar'}}
With the following:
<a href="YOU_CUSTOM_URL_HERE" class="lt-btn lt-btn--topbar">Submit a ticket</a>
Changing Sign in link
Replace the existing line:
{{#link "sign_in" class='lt-btn lt-btn--topbar'}}
{{t 'sign_in'}}
{{/link}}
With the following:
<a href="YOU_CUSTOM_URL_HERE" class='lt-btn lt-btn--topbar'>
{{t 'sign_in'}}
</a>
You can find another Submit a ticket link in the home_page.hbs template. Keep the CSS classes, but edit the helper to create a link. Replace the existing line:
{{link 'new_request' class='lt-btn lt-btn--primary lt-footer-submit-ticket__btn'}}
With the following:
<a href="YOU_CUSTOM_URL_HERE" class='lt-btn lt-btn--primary lt-footer-submit-ticket__btn'>Submit a ticket</a>