最近搜索


没有最近搜索

Change text for "My Activities" in HC



已于 2024年3月14日 发布

Is it still possible to adjust the text that is on the drop down menu and change the text from My Activities to My Requests

Tried both and added them to script.js but no luck so far 

//Change string for My Activities

$('.user-nav .my-activities').html(' See my requests');
$('.sub-nav').find('li').filter(":last");

and 

//Change string for My Activities
$('.nav-wrapper .dropdown-menu .my-activities').html('My Requests');
$('.sub-nav').find('li').filter(":last");


0

2

2 条评论

image avatar

Jakub

Zendesk Customer Care

I used this javascript to update my dropdown title:

document.addEventListener('DOMContentLoaded', function() {
    var link = document.querySelector('a.requests-link[role="menuitem"]');
    if (link) {
        link.innerHTML = 'Updated Requests';
    }
});


If you have a public help center page and would share the link, I could have a look if I can apply this principle for your title. 

0


Hi Jakub

I've managed to by adding this at the end of the script.js

document.addEventListener('DOMContentLoaded', function() {
  // Function to replace text
  function replaceText(element, oldText, newText) {
    if (element.innerText) {
      element.innerText = element.innerText.replace(oldText, newText);
    } else if (element.textContent) {
      element.textContent = element.textContent.replace(oldText, newText);
    }
  }

  // Replace text for the specific anchor with href="/hc/en-nz/requests"
  var linkElement = document.querySelector('a[href="/hc/en-nz/requests"]');
  if (linkElement) {
    replaceText(linkElement, 'My activities', 'My requests');
  }
});

 

 

0


请先登录再写评论。

找不到所需的内容?

新建帖子