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

4 댓글

  • 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
  • Jessica Fong

    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
  • Tipene Hughes
    Zendesk Developer Advocacy
    Hey Ashley,
     
    The link you're referring to is generated by the breadcrumbs helper. The URL can't be changed directly via the helper but you'll be able to change the anchor href by adding some custom Javascript code in the script.js file in Guide Admin.
    0

댓글을 남기려면 로그인하세요.

Zendesk 제공