Let's say that your company targets the French and English speaking markets. You would therefore like to have a different footer on your help center to provide different contact information based on your customer's language. Or maybe, for a better customer experience, you'd like to display the French support number only to French speaking customers. In this article, you'll learn how to set this up.
This article covers the following topics:
Creating a new dynamic content item
You need to be a Zendesk Support administrator to create dynamic content. In this example, you'll create a dynamic content item with a French variant and add the HTML code of the footer you'd like to be displayed for French speaking customers. Dynamic content allows you to choose a default language. A good best practice is to English if your customer selects a language for which you don't have a footer translation.
- Click the Admin icon (
) in the sidebar, then select Dynamic Content .
- Click Add Item .
- Choose a name, such as footer or HC_footer to more easily find your help center related dynamic content later.
- Select a default language such as English.
- Paste the HTML code you want to display for English speaking customers in the content box.
- Click Create to save your dynamic content item.
- Notice the item's name between curly brackets. You'll use that later on.
- Now add one or more other translations. To do so, click Add Variant and follow steps 3-6 again.
Your dynamic content ready. Now, you can add it to your help center.
Modifying your help center theme
- In Guide, click the Customize design icon (
) in the sidebar.
- Click the theme you want to edit to open it.
- Click the options menu, then select Edit Code.
- This example modifies the footer so open the Footer template.
- Use the following syntax to insert the dynamic content item we created above: {{dc ' item_name '}}.
- Click Save and you'll be able to see the newly added footer.
- Click Publish changes.
Now, your custom footer on your help center and the text will be displayed based in the language your customers select on the homepage.
This article covered only the footer but you can go further than that. You could have a completely different look and feel based on your customer's language. Or maybe the product you're selling has a different name in French than in English; in this case you can use dynamic content to display a different logo based on the customer's language.
44 Comments
@Trapta Thanks it worked.
Hello @Jacob J Christensen
On this comment that you left I cannot get it to work. Can you please help me out?
Your placeholder in Zendesk support:
Your placeholder should look like this in the html templates:
Hope that helps you out!
Here is the code I'm using:
if(ticketForm == 360001513253) {
$('.form-field.request_subject').hide();
$('.form-field.request_description').hide();
$('#request_subject').val('Your Deactivation Request Has Been Recieved');
$('#request_description').val('{{dc'autosolve_pending_ticket-15_day_reminder-project_boost'}}');
I have hidden the description field and subject field. I would like the dynamic content to pick up the requester language and display the content in the dynamic content to them.
I'm doing this in the template called script.js
Do you know what I'm missing?
Hi @Anton Van der meyden,
This will not work in script.js file. You need to put the code at the bottom of new_request_page.hbs template under <script></script> element.
Let me know if this solves your issue.
Thanks
Hello@Trapta,
Thank you for your help.
I tried my code on the template new_request_page.hbs
Here is the code I added to the bottom of the template.
<script>
$(document).ready(function(){
var ticketForm = location.search.split('ticket_form_id=')[1];
if(ticketForm == 360001513253) {
$('.form-field.request_subject').hide();
$('.form-field.request_description').hide();
$('#request_subject').val('Hello');
$('#request_description').val('{{dc'autosolve_pending_ticket-15_day_reminder-project_boost'}}');
}
});
</script>
It gives the error the subject field and description field cannot be blank.
Can you assist further with this please?
Thank you.
Hello @Trapta,
I got it to work. There was an issue with the DC.
Thank you for your help.
This is helpful. It would be great to be able to use dynamic content within a help center article.
Use Case: Mainly for screenshots that we embed in our help Centers. Recently we redesigned our User Interface so we had to go through our entire help center replacing and screenshots of our old interface, with the equivalent screenshot from our new interface. Many screenshots show up in more that one article, so dynamic content would reduce the amount of content we have to update and give us visibility into all the screenshots that are being used in our help center
Hi,
Is it possible to use the same logic for images and if so, how ?
I have some images in the templates of my different pages (see screenshot) and I would like to be able to change this image depending on the language of the Guide. If possible I would also like to be able not to display an image for a specific language.
Thanks !
Hey Adrien,
I wasn't able to find any tips specific to your use-case, however, it does look like one of our Community Moderators submitted a tip onHow to change the banner image of your Zendesk Help Center for each language. Perhaps this will point you in the right direction?
Hopefully others can jump in and offer up some advice as well.
Cheers!
Hey there,
I also have a use case for loading Dynamic Content into Guide Articles.
We have many articles which refer to a particular product version, so every time we release a new version of the product, we have to update each of these articles. This was fine when we only had tens of articles, however we are now in the hundreds, so updating all of these articles every release is proving ever more time consuming. Having a Dynamic Content variable called productVersion in our articles would be very useful, so we just change the Dynamic Content in one place, then all of our articles would be automatically updated.
As noted in other threads, using {{dc 'productVersion'}} or {{dc.productVersion}} in the content of an article don't seem to work. Is there any other simple way to do this?
Cheers
I second what Peter said. Due to COVID, we've had to update our process timeline and that specific timeline is scattered across multiple articles. I just figured out I can add the placeholder in our macros which is great, but I was hoping we could do that with our articles too but it doesn't seem to work.
Hi Andrea
It is not possible to use DC in articles, unfortunately. The only current solution I see is to create your own javascript that changes/replace text on page load. That of course has it's weaknesses (malfunction, browser incompatibility etc).
Hi Peter and Andrea
I just stumbled on this one: https://www.zendesk.com/whats-new/ Look under guide for the EAP for content blocks which is exactly what you are looking for :-)
I'm sorry to ask but I'm stuck at step 1:
Everything else is quite clear, but I'm unable to set any dynamic content...
Any help?
thanks
Hi Federico,
The first thing I'd check is your plan type, as this feature is only available to those on Professional or Enterprise plans. Can you confirm what plan type you're on?
Please sign in to leave a comment.