최근 검색


최근 검색 없음

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


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

원하는 정보를 못 찾으셨나요?

새 게시물