Change text for "My Activities" in HC

34 Comments

  • Andrea Saez
    Comment actions Permalink

    Update: I am currently modifying this code + the code for personalized breadcrumbs in HC so that they are all updated with appropriate encoding and reflect the page navigation. Please to stand by!

    0
  • Wes Drury
    Comment actions Permalink

    @Andrea - thanks for the updates, you've been very busy today!!

    0
  • Andrea Saez
    Comment actions Permalink

    Not me, the props go to my team :) I just learn, post, and share with you guys!

    0
  • Andrea Saez
    Comment actions Permalink

    Just updated it - 

    subnav breadcrumb should show

    $('.sub-nav').find('li').filter(":last");

    0
  • Justin Koehler
    Comment actions Permalink

    Hello,

    I am going mad trying to figure out a little issue I am having with the cache storing our SSO sessions after a user is authenticated from our SSO script. Once a user logs into the Help Center, they are unable to click on the Sign Out link from the {{user-nav}} drop-down menu.

    I figured out (more or less) how to resolved this, but sadly I am stuck.
    Essentially, the URL when clicked is "/access/logout" the authenticated user is kicked to the home page and then continues to be authenticated.
    This can be resolved if I could only figure out how to replace the URL with "/access/logout.json".
    I found the article below on how to change the text for My Activities... arg..... Please help if you can! Would much appreciate it.

    Here's how to change the "My Activities" text
    1) At the bottom of your HC, click on Customize Design
    2) Click on Edit Theme to access your template's code

    3) Navigate to the JS tab and add the following code:

    //Change string for My Activities
    $('.user-nav .my-activities').html(' See my requests');

    $('.sub-nav').find('li').filter(":last");

    Failed Attempt:
    //Change string for anchor tag to force logout
    $('.user-nav .li a').html('/access/logout.json');
    $('.sub-nav').find('li a').filter("/access/logout");

     

    0
  • Bob Novak
    Comment actions Permalink

    Hi Justin,

    I'm not sure that this approach is correct for changing the URL that the Sign Out link goes to. The example from Andrea is for replacing the displayed text, not modifying where this link goes. Since you have JWT set up, you may want to review where your Remote logout URL is pointing to. That setting is located here: Admin>Settings>Security. It sounds like your users are getting directed to the remote logout URL, your script determines that they are authenticated and then sends them right back to Zendesk. If that is the case you may need to modify your authentication script. You can find good examples here:

    https://github.com/zendesk/zendesk_jwt_sso_examples

    0
  • Andrea Saez
    Comment actions Permalink

    Thanks for jumping in Bob.

    @Justin - as Bob said, this tutorial is simply for changing the text name, not where the link goes. 

    0
  • Lindsay Ward
    Comment actions Permalink

    Thanks for the details on changing My Activites!

    0
  • Jon
    Comment actions Permalink

    Thanks gang. Is there any possibility this workaround only works with certain themes? Or perhaps things have changed in the last few months which prevents the js tweak from working? I can't get it to take.

    0
  • Andrea Saez
    Comment actions Permalink

    Hi Jon,

    What theme are you using? 

    0
  • Jon
    Comment actions Permalink

    Thanks much Andrea!

    We're using "The Humble Squid" with some light customizations.

    0
  • Andrea Saez
    Comment actions Permalink

    Hi Jon,

    I got it to work. Make sure you add it after the last bracket

    See image attached:

     

    0
  • Jon
    Comment actions Permalink

    Hi Andrea. I'm a bonehead. You were right on. Thanks for the assist and have a great day.

    0
  • Andrea Saez
    Comment actions Permalink

    That makes us both boneheads, cause it took me a second to figure out too :P

    Happy Friday!

    0
  • Rich Warren
    Comment actions Permalink

    @Andrea - How did you add the "Submit A Request" link next to the "See My Requests" link?

    0
  • Rich Warren
    Comment actions Permalink

    @Andrea - Disregard my last comment.

    0
  • Henry Engle
    Comment actions Permalink

    This is very helpful, thank you!

    0
  • Benjamin.kassentoft
    Comment actions Permalink

    @Andrea, Do you know how to apply localize to a mailto button?

    We are using different languages with different support email, and I want to change the email depending on what language is being used.

    0
  • Alex Zlatkus
    Comment actions Permalink

    Is there any way to change the text for all of the following areas? see attachment

    0
  • Jessie Schutz
    Comment actions Permalink

    Hey Alex!

    It may be possible to do this by customizing the code in your Help Center, but that outside my area of expertise. We have several folks here who are good at customizing the Help Center, so hopefully one of them will be able to jump in!

    0
  • Rafael Cueto-Felgueroso
    Comment actions Permalink

    I'm also trying to change the text for all the areas Alex Zlatkus asked for, but up till know I could't do it.

    0
  • Mart Hough
    Comment actions Permalink

    :( I tried this modification, but where it should say "My Activities" it says "Liquid error: undefined method..."

    I added this above snippet after the final closing brackets..

    Then Inside the final brackets. Same error.

    Now I have removed it altogether, but the error persists across multiple devices.. so its not a cache thing.

    I don't know what I did.. here is the js code. perhaps I deleted one character too many.. I didn't grab the code before I started... :/

     

     

    0
  • Mart Hough
    Comment actions Permalink

    it seems it was a cache issue. appears to have gone away

     

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Glad to hear it seems to have resolved itself. Let us know if you have further questions. 

    0
  • Raquel
    Comment actions Permalink

    Hi, 

    I copied the first code and in the English version it was everything ok, but when I tried to do it for the french one it didn't appear. In fact, now we have only the Eglish text for all the other languages. 

     

    May I see how did you insert it to the JS tab? 

     

    Thanks!

    0
  • Andrea Saez
    Comment actions Permalink

    Hi Raquel,

    I think that Zendesk has changed how they identify languages, so you may have to use 'fr' or 'en-us' instead of writing it out as 'Français'. 

    Hope that helps!

    0
  • Annie Larrabee
    Comment actions Permalink

    I'm having some trouble getting this to work as well. I'm wondering if I'm in the wrong place? I'm not sure where exactly I should be adding those lines of code.

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hey Annie - 

    I see that this is your first post - welcome to the Zendesk Community! I've pinged a few folks internally to take a look and see if this article needs updating; we'll get back to you on that once they've had a chance to review it. 

    In the meantime, I encourage you to head over to the Welcome thread and introduce yourself. 

    0
  • Annie Larrabee
    Comment actions Permalink

    Great thank you!

    0
  • Jennifer Rowe
    Comment actions Permalink

    Hi Annie,

    The UI did change back in May so the first step (which is an important one! :) was incorrect. I've updated it, so see if you can get to the right place now to add the code snippet to your Help Center JavaScript code.

    This article also describes how to edit the JS, if you need more help.

    Let us know how it goes!

    0

Please sign in to leave a comment.

Powered by Zendesk