Hiding the widget button via zESettings object

3 コメント

  • Simon Blouner
    コメントアクション Permalink

    Hey Ramesh,

    There's plenty of different topics on the Zendesk commnity about this - some them outdated, some of them with wrong info.
    By implementing the following, it will work with the latest version of the Widget API.

    1. Add your Widget Script to your header.

    2. Add the following  script to your HTML page or javascript file. If in javascript file, loose the <script> tags:

    <script type="text/javascript">
            zE('webWidget', 'hide');
            $( document ).ready(function(){
                $( "#showWidget" ).on( "click", function() {
                zE('webWidget', 'show');
                zE('webWidget', 'toggle');

    This script is listening to an HTML element with the ID of showWidget, e.g. 

    <div id="showWidget">Open Widget</div>


    #helpsome regards,
    Simon Blouner
    Zendesk Consultant @ helphouse.io

  • Fernando Duarte
    コメントアクション Permalink

    @simon   How can I implement this to hide the Widget in Guide based on user tags?

  • Simon Blouner
    コメントアクション Permalink

    Hey Fernando,

    To the best of my knowledge I'm afraid this is not possible in a simple way as above.

    In theory, it should be possible to code a GET request based on the id available in the {{user}} object - but unfortunately, it seems like this object is only available on the User Profile Template, which doesn't make it a possible scenario anyways.





Powered by Zendesk