Question
How do I customize the Web Widget in my Help Center using APIs?
Answer
If you have the Web Widget embedded in your Help Center and you want to customize the settings of your Web Widget using the Web Widget API, you can do so by modifying your Help Center theme's header.hbs template file.
To add your custom Web Widget 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 header.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 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 header.hbs file:
For more information on making customizations to the Web Widget and your Help Center, see the articles:
3 Comments
<script type="text/javascript">
window.zESettings = {
webWidget: {
offset: { horizontal: '100px', vertical: '150px' }
}
};
</script>
Should be enclosed in <script> tags
Thanks for sharing Yusuke! This article has been flagged to be updated :)
Thanks, Yusuke Kajino
The article is now updated with your suggestion!
Please sign in to leave a comment.