Change "request" to "case"
AnsweredHi 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.
-
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
-
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.
-
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
-
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"? -
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
-
Hi Pulkit,
This worked! Thank you so much for all your help!
-
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 😃
-
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
-
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".
-
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
-
Hi Pulkit,
The code worked. Thank you so much for all your help!
Please sign in to leave a comment.
11 Comments