Workflow: How to change the text "Submit a request" in the help center

To change the text of the Submit a request link on your help center, edit the code in your theme. The workflow includes the steps below:

Expand all tabs



document.addEventListener('DOMContentLoaded', function () {
const toggleBtn = document.getElementById('master-toggle');

toggleBtn.addEventListener('click', function () {
const action = this.getAttribute('data-action');
const headers = document.querySelectorAll('.accordion');

headers.forEach(header => {
const isActive = header.classList.contains('active');
const panel = header.nextElementSibling; // Grabs the corresponding .panel container

if (action === 'expand' && !isActive) {
// Open it by simulating a standard click
header.click();
} else if (action === 'collapse' && isActive) {
// Close it by simulating a standard click
header.click();
}
});

// Flip button text and states
if (action === 'expand') {
this.setAttribute('data-action', 'collapse');
this.textContent = 'Collapse all tabs';
} else {
this.setAttribute('data-action', 'expand');
this.textContent = 'Expand all tabs';
}
});
});
Step 1: Verify the prerequisites This change requires you to edit the theme code of your help center and is available only on Suite Growth plans or higher. Step 2: Make a copy of the theme
To change the text of the Submit a request link on your help center, replace the text in the code that sets this text.
Before you make changes to your live theme, make a copy of the theme and update the copied version.
Step 3: Change the text
To change the text of the link:

In Knowledge admin, select the icon Customize design ( ) in the sidebar
On the theme you want to edit, select Customize to open the theme
Select Edit code at the bottom of the page

Select header.hbs and replace the code below:
{{link 'new_request' class='submit-a-request'}}
with this code:
{{#link 'new_request' class='submit-a-request'}}Contact Us{{/link}}
Replace the text Contact Us with the text you want to display.


Select Publish to save the changes

The theme code displays the new text.
This change alters the display of the link on the home page only and doesn't change breadcrumbs on your site. To update this text wherever it appears, use JavaScript or jQuery.

Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code, which might become obsolete over time. Zendesk can't provide support for third-party technologies such as JavaScript, jQuery, or CSS. Post any issues you have in the comments section or try searching for a solution online.
