Tip: How to change the url of the logo of your Help Center

3 Commentaires

  • Daniel Cowlishaw

    Hi Trapta,

    Do you know if it is possible to change the link depending on the page you're visiting?

    For example, if I'm on the Community pages, can I make the logo link to the Community homepage rather than it go to the Help Center homepage? Is there an if statement that could handle this?

    For branding purposes we're looking to cut the ties between our HC and Community which we can't do at the moment as it links back to the HC when clicking the logo in the top-left.

    Thanks, Danny

    0
  • Trapta Singh
    Community Moderator

    Hi Daniel Cowlishaw,

    Try putting the below code at the bottom of your script.js file

    document.addEventListener('DOMContentLoaded', function() {
    function isCommunityTemplate() {
    if ( window.location.href.indexOf('community') > -1 ) {
    return true;
    }
    }

    var isCommunityPage = isCommunityTemplate();
    if ( isCommunityPage != undefined && isCommunityPage == true ) {
    var curLocale = document.getElementsByTagName('html')[0].getAttribute('lang').toLowerCase();
    document.getElementsByClassName('logo')[0].children[0].setAttribute('href', '/hc/'+ curLocale +'/community/topics');
    }

    });

    Let us know if this works for you.

    Thanks

    0
  • Ashley Yau

    Hi Team,

    I would like to know if it's possible to change the URL of the"HiCircle"in red? We are not going to build a help center but just would like to make sure of the zendesk form, thanks!

     

    0

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk