Question
How can I customize the Web Widget (Classic) in my Help Center using APIs?
Answer
If you have the Web Widget (Classic) embedded in your Help Center and you want to customize its settings using the Web Widget (Classic) API, you can do so by modifying your Help Center theme's document_head.hbs template file.
To add your custom Web Widget (Classic) settings, follow these steps:
- In Guide, click the Customize design icon (
).
- Click the theme you want to edit to open it.
- Click the options menu, then select Edit Code.
- In the Templates section, click document_head.hbs to modify the code.
- Place the desired code below the first
<header class="header">
line, and above the final header line.
For example, if you want to change the positioning of your Web Widget (Classic) in your Help Center, use this API setting:
<script type="text/javascript">
window.zESettings = {
webWidget: {
offset: { horizontal: '100px', vertical: '150px' }
}
};
</script>
This is what this should look like in the document_head.hbs file:
For more information on making customizations to the Web Widget (Classic) and your Help Center, see the articles:
1 Comments
Hello,
Is this the only method to use use the APIs in the Help Center Web Widget? Looks like editorial access to header.hbs requires Pro or Enterprise level plans. Ideally from a UI and controls prospective it would seem to make more sense that admins should be able to do this via the 'Setup' tab under Channel/Widget since there is an interactive input field here but no way to save changes. Putting in a feature request for this.
Thanks
Please sign in to leave a comment.