Recent searches


No recent searches

Change "request" to "case"

Answered


Posted Apr 07, 2023

Hi there,

We are about to release our Zendesk help center, but we need to change the word "request" to "case" everywhere. How can we do this?

I tried all the scripts provided in https://support.zendesk.com/hc/en-us/community/posts/4409507233562-Customizing-My-Activities, but none of them worked. I notice the post is five years old, so perhaps that is why. 

Any help is appreciated. Thank you.


1

11

11 comments

image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

HiJake Mahon

Please, add the below code at the bottom of your script.js file 

var anchors = document.querySelector(".collapsible-nav-list li:first-child a").text;
var newstring = anchors.replace("requests","Case");
document.querySelector(".collapsible-nav-list li:first-child a").innerHTML = newstring;

var anchorsCC = document.querySelector(".collapsible-nav-list li:nth-child(2) a").text;
var newstringCC = anchorsCC.replace("Requests","Case");
document.querySelector(".collapsible-nav-list li:nth-child(2) a").innerHTML = newstringCC;

var PlaceHolder = document.querySelector(".requests-search");
PlaceHolder.setAttribute('placeholder', 'Search Case');

Let me know if it solves your issue 

Thank You 

Pulkit

Team Diziana

0


Hi Pulkit, I work with Jake and the script updated the "My Requests" page tabs but not the title of the page, also it appears that the changes were not reflected on the "Submit a New Request" page.

 

0


image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

Hi Milo Mayyalou

Now here is a trick, you need to add the script on their respective template so that it will not throw an error on the remaining templates when they don't find the target elements.

1. Go to requests_page.hbs file on your theme and at the bottom of that page please add the below code 

<script>

var anchors = document.querySelector(".collapsible-nav-list li:first-child a").text;
var newstring = anchors.replace("requests","Case");
document.querySelector(".collapsible-nav-list li:first-child a").innerHTML = newstring;

var anchorsCC = document.querySelector(".collapsible-nav-list li:nth-child(2) a").text;
var newstringCC = anchorsCC.replace("Requests","Case");
document.querySelector(".collapsible-nav-list li:nth-child(2) a").innerHTML = newstringCC;

var PlaceHolder = document.querySelector(".requests-search");
PlaceHolder.setAttribute('placeholder', 'Search Case');

var reqHeading = document.querySelector(".my-activities-header h1").innerHTML;
var reqNewstring = reqHeading.replace("requests","Case");
document.querySelector(".my-activities-header h1").innerHTML = newstring;

</script>

2. Go to the new_request_page.hbs template of your theme and then to the bottom of your template, please add the below code 

<script>
  
  var breadCrumbs = document.querySelector(".breadcrumbs li:nth-child(2)").innerHTML;
  var breadCrumbsString = breadCrumbs.replace("request","case");
  document.querySelector(".breadcrumbs li:nth-child(2)").innerHTML = breadCrumbsString;

  var ReqMainHeading = document.querySelector(".container h1").innerHTML;
  var ReqMainHeadingString = breadCrumbs.replace("request","case");
  document.querySelector(".container h1").innerHTML = breadCrumbsString;

</script>

Let me know if it solves your issue

Thank You 

Pulkit

Team Diziana

0


Thank you Pulkit! This resolved the issue and updated both pages. Your quick response is appreciated!

Would it be possible to modify the highlighted text for consistency in using "cases" rather than "requests"?





0


image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

Hi Milo Mayyalou

 

Please add the below code under the same script tag on there respective pages provided earlier

1. Go to requests_page.hbs file on your theme and at the bottom of that page please add the below code 

var noreqHeading = document.querySelector(".no-activities").innerHTML;
var noreqHeadingNewstring = noreqHeading.replace("requests","Case");
document.querySelector(".no-activities").innerHTML = noreqHeadingNewstring;

2. Go to the new_request_page.hbs template of your theme and then to the bottom of your template, please add the below code 

 

var Reqdescription = document.querySelector("#request_description_hint").innerHTML;
console.log(ReqMainHeading);
var ReqdescriptionString = Reqdescription.replace("request","case");
document.querySelector("#request_description_hint").innerHTML = ReqdescriptionString;  
  

 

Please let me know if it solves your issue

Thank You

Pulkit

Team Diziana

1


Hi Pulkit,

This worked! Thank you so much for all your help!

1


Hi Pulkit Pandey we actually have one more issue 😅

How can we change "Organization requests" to "Organization cases"?

Thanks in advance for any help you can offer 😃

0


image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

Hi Jake Mahon

Please add the below code at the bottom of  requests_page.hbs 

var organization = document.querySelector(".collapsible-nav-list li:nth-child(3) a").text;
var Neworganization = organisation.replace("Organization","Case");
document.querySelector(".collapsible-nav-list li:nth-child(3) a").innerHTML = Neworganization;

Let me know if it solves your issue 

 

Thank You 

Pulkit

Team Diziana

0


Hi Pulkit Pandey

I pasted that code below the other code you've offered us at the bottom of requests_page.hbs, but I still see "Organization requests" in our help center. Any idea what I'm doing wrong?

By the way, we've changed "cases" to "tickets".

0


image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

Hi Jake Mahon

Please, add the below code in place of the previous one on the requests_page.hbs.

var organization = document.querySelector(".collapsible-nav-list li:nth-child(3) a").text;
var Neworganization = organization.replace("requests","tickets");
document.querySelector(".collapsible-nav-list li:nth-child(3) a").innerHTML = Neworganization;

Let me know if it solves your issue 

Thank You 

Pulkit

Team Diziana

0


Hi Pulkit,

The code worked. Thank you so much for all your help!

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post