How can I change the wording in the "Recent activity" heading?

Répondu

30 Commentaires

  • Diziana

    Hi David

    You can use some jquery to change it on runtime. That said, please do look at documentation to see if there is a better method.

    If you are interested in jquery method, please leave a comment and I would post some code snippet.


    Thank you

    Team Diziana 

    Visit Diziana to download free and premium custom responsive ready-to-use Zendesk theme or Zendesk template or Zendesk plugins for Zendesk Help Center. Brand your Zendesk Help Center, and provide fantastic self-service customer support experience.

    0
  • CST

    Hello David,

    Please use this one -

    Paste the code on your JS tab  

    $(document).ready(function() {
    $('.recent-activity-header').html('ADD-YOUR-TITLE');
    });

    If face any issue feel free to message us at info@customersupporttheme.com

    Thanks

    Support Team

    http://customersupporttheme.com

    (Experts in Zendesk Themes, Zendesk Help Center, Plugins, Help Center Branding and Customization.)

     

    0
  • David

    Hi Diziana,  it would be great if you could post a code snippet, something I could just copy and paste in.

    Thanks!

    0
  • David

    Hello Customer Support Theme,

     

    I'm afraid the code you provided is not working for me. I placed it at the end of the code in the JS tab, as you suggested.

    Also, I see that the screenshot doesn't contain all the code you provided in the post.

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Hello David! Could you please provide us link to your Help Center or Screenshot of code that you've changed? 

     

    0
  • David

    This is from after I clicked "Preview"

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Thanks for the screen. From this point the code looks fine. Please try with this code, paste it on the very bottom of your Home Page code editor (or footer).

    <script>
    $(document).ready(function() {
    $('.recent-activity-header').text('Here is new title');
    });
    </script>
    0
  • David

    works great, thanks! and it's also a better solution for me because I have 2 languages, and this enables me to use Dynamic Content

     

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Glad that it works, and even better for Dynamic content!

    Feel free to ping us if there is any issue more.

    0
  • CST

    Hello @David,

    I am totally surprised.How it is possible because at my end its working fine.

    Both code snippet is working proper on my side - 


    $(document).ready(function() {
    $('.recent-activity-header').html('Your New Title');
    });

    $(document).ready(function() {
    $('.recent-activity-header').text('Your New Title');
    });

    You can also see the Live Demo.

    Thanks

    Support Team

    http://customersupporttheme.com

    (Experts in Zendesk Themes, Zendesk Help Center, Plugins, Help Center Branding and Customization.)

    0
  • Jessica Hopcraft

    @Vladan,

    Any idea why this isn't working for me? I have also tried @Customer Support Theme's code.

    I'm racking my brains here so your advice would be great!

    Thanks,

    Jess

     

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Hi Jess, just remove this my code from JS tab, and put it (copy/paste) on the very bottom of Home Page code. Please let me know if there is an issue after this change. 

    Thanks!

    0
  • Jessica Hopcraft

    Thank you Vladan that worked perfectly. 

    0
  • Tami Settergren

    This code works great to change "Recent activity" to "Recently viewed":

    <script>
    $(document).ready(function() {
    $('.recent-activity-header').text('Recently viewed');
    });
    </script>

    But I can't get the dynamic content function to work. I've defined the content on the Dynamic Content page:

     

    What then is the syntax for using the placeholder in the script? I tried many different syntaxes, including these:

    <script>
    $(document).ready(function() {
    $('.recent-activity-header').text({{dc 'recently_viewed'}});
    });
    </script>

    <script>
    $(document).ready(function() {
    $('.recent-activity-header').text="{{dc 'recently_viewed'}}";
    });
    </script>

    <script>
    $(document).ready(function() {
    $('.recent-activity-header').text={{dc 'recently_viewed'}};
    });
    </script>

    But my home page still shows the default text "Recent activity". What am I missing?

    0
  • Trapta Singh
    Community Moderator

    Hi @Tami,

    Try putting your code at the bottom of home_page.hbs template. 

    <script>
    $(document).ready(function() {
    $('.recent-activity-header').text("{{dc 'recently_viewed'}}");
    });
    </script>

    Let me know if you face any issue.

    Team Diziana

    0
  • Tami Settergren

    Hi Team Diziana,

     

    The code is at the bottom of my home page:

     


    It does work to change "Recent activity" to "Recently viewed", but I can't get it to work as Dynamic Content.



    0
  • Trapta Singh
    Community Moderator

    @Tami,

    All you need to do is remove that '=' in your code at line no. 75 and you will be good to go.

    Let me know if you face any issue.

    Team Diziana

    0
  • Tami Settergren

    Ok, that one worked:

    $('.recent-activity-header').text("{{dc 'recently_viewed'}}");

    I thought I'd tried that syntax, but must not have --thanks much, Trapta!

    0
  • Chuck Yocum

    Where can i find $('.recent-activity-header'). in the documentation.  I want to write other stuff but can't find the objects.

    0
  • Brett Hoffman

    Here's the JavaScript solution for themes that don't use jQuery. Just change the "Recent Updates" text to what you want, place it in your theme's script.js file:

    document.getElementsByClassName("recent-activity-header")[0].innerHTML="Recent Updates";
    0
  • Nicole Saunders
    Zendesk Community Manager

    Thanks for sharing that, Brett!

    0
  • Shweta

    Is there a way I can limit it to recently added articles? Please suggest.

    0
  • Brett Bowser
    Zendesk Community Manager

    Hey Shweta,

    We don't have a placeholder for recently added articles, however, if you create an article you can promote it and then use the promoted_articles placeholder instead. Check out our available Helpers here: Help Center Helpers

    I hope this helps!

    0
  • Jimmy

    Can't seem to get this down. Any suggestions?

    0
  • Dave Dyson
    Hi Jimmy -
     
    In order to add Javascript, you'll want to add your code to the script.js file, rather that putting in the HTML page templates. See Customizing your help center theme
    0
  • Jimmy

    @... - Was following some of the comments above that suggested adding it to home_page.hbs. I just want to change the "Recent Activity" to "Recently Viewed" on my homepage. Any suggestions? 

    0
  • Greg Katechis
    Zendesk Developer Advocacy

    Hi Jimmy! As Brett noted above in the comments, you can just put this in your script.js file:

    document.getElementsByClassName("recent-activity-header")[0].innerHTML="Recent Updates";
    0
  • Miguel Romero

    It is possible to display "category" instead of "section" in "Recent Activity" section?

    0
  • Fiorella Jiménez

    Hi team, How can I change the wording in the “Fallow” button?

    0
  • Erica Girges
    Zendesk Developer Advocacy

    Hi Fiorella!

    You can try adding something like this at the bottom of the script.js file. 

    This code specifically allows you to change the "Follow"/"Unfollow" button text within article pages.

    $(document).ready(function() {
      if($(".article-subscribe div button").attr("data-selected") === "false") {
      $(".article-subscribe div button").text('Something')
      } else {
        $(".article-subscribe div button").text('Something Else')
      }
    });

    $(".article-subscribe").click(function() {
      if($(".article-subscribe div button").attr("data-selected") === "false") {
          $(".article-subscribe div button").text('Something')
      } else {
        $(".article-subscribe div button").text('Something Else')
      }
    });
    0

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk