By default, clicking the logo image in your help center header returns users to the home page. You can edit the HTML in your theme to return users to a different URL.
To update the logo URL
- Upload your logo image to the Assets area, as described in Using your own theme assets for help center.
Make a note of the image's URL.
- Click the Customize design icon (
) in the sidebar.
- Click Customize.
- Click Edit code at the bottom of the page.
- Choose header.hbs from the templates list, and locate the logo div tag in the HTML:
<div class="logo"">
- Replace this code:
{{#link 'help_center'}} <img src="{{logo_url}}" alt="{{t 'logo'}}"> {{/link}}
with the following HTML (in bold):
<div class="logo"> <a href="http://new_url"> <img src={{asset 'uploaded-image-name.png'}} /> </a> </div>
The code inserts a linked image in the page.
- Specify the URL of the page (new_url), the path to your logo image (path_to_image), and the image name (image).
- Click Save.
6 comments
Chad Susa (Gravity CX - Zendesk Partner)
Hi
Wondering how to change the alt text from Home for the Help Centre Logo?
I've tried:
But no luck. Is this possible? I'd still like to use the standard {{settings logo}} placeholder so I can simply upload brand logos from the edit page (not have to upload them as new assets every time).
0
Tal
hey,
how can I tell what is the correct path-to-image?
after I have already uploaded the image to my assets?
0
Landry Norman
Chad Susa (Gravity CX - Zendesk Partner) you can just add the
in place of the current link conditions while keeping the image source from the settings.
0
Dave Dyson
0
Wilhelm Lenz
Hello,
I am trying to replace the logo from the script.js. I have different logos in the assets folder that I want to output depending on the URL parameters. Checking for parameters works, but unfortunately the logo image is not displayed to me because when I ask for the logo from the assets folder, the code is processed weirdly. Can someone help me?
And this is what comes out
0
Greg Katechis
Hi Wilhelm! The reason that you're running into this issue is because assets can't be called from the script.js file. If you're adding it via JS, they can only be called from the template itself. We note that in our documentation here. You can instead move that function into a script tag on the header template and you should be all set!
0