How can I add new link to my nav bar in the header when customizing the help center?

Répondu

6 Commentaires

  • Tal Admon

    Hi Lisa,

    Adding the following Script tag in the Header section in the Theme Editor will do.

    The custom link will be shown to anonymous and logged in users as well.

    See live at:

    https://moderatortal.zendesk.com/hc/en-us
    Log in as sun1@example.com / 123456

    <script>
    $(document).ready(function(){
    $('nav.user-nav>a:last').css('border-left','1px rgba(0, 0, 0, 0.07) solid')
    $('nav.user-nav').append('<a class="custom_navbar_link__c" href="http://www.google.com">Google</a>');
    $('nav.user-nav>a:last').css('border-left','0px')
    })
    </script>

     



     

    0
  • Matt Picasso

    Hello,

    Is there an updated version of this code for the new Theme style? When using this on my Help Center it keeps placing the link to the right and the border seperator to the left of "Submit a Request"

    Thank you,

    0
  • Jessie Schutz
    Zendesk Customer Care

    Hey Matt! Welcome to the Community!

    Can you post a screenshot of the code exactly as you entered it? That'll help us figure out what might be going wrong here.

    0
  • Matt Picasso

    HI Jessie,

     

    Here is the screen shot:

    0
  • Jessie Schutz
    Zendesk Customer Care

    Thanks Matt! I'll see if one of our Community Moderators can take a look at it with you!

    0
  • ModeratorWes
    Most Engaged Member of All Time - 2021

    @Matt - lets get rid of all the JS as we don't really need it for this.  Inside of your header.js add the following below the <nav class="user-nav"

    <a href="https://google.com">Google</a>

    That should add it in there and make it aligned with all the other links.

    0

Cette publication n’accepte pas de commentaire.

Réalisé par Zendesk