Using Dynamic Content in articles
The ability to use dynamic content in article HTML would be super useful. For example, I have a dynamic content that says "© 2020 Acme, Inc. All rights reserved." So if I can use the dynamic content in help articles, I just have to update this dynamic content next year to 2021. Otherwise I have to manually update all 100+ articles for this change.
-
This will be a very neat feature. In our guides sometimes multiple articles share the same first 3 or 4 steps. It would be nice to update them all at once.
-
Aswin, this is how we dynamically display the current year in the footer of our Help Center.
Include the following code in your script.js file (it's jQuery, but plain Javascript code can be substituted):
$('.copyrightYear').html(new Date().getFullYear());
Then include the following HTML code in your footer.hbs file (or wherever you want to display the current year):
<span>© <span class="copyrightYear"></span> Your Company Name</span>
-
Don, you can use Javascript to prepend content to the beginning of your article. It's not optimal since it inserts the content after the page loads, but it allows you to change the content all at once.
In your article, create an element and give it a unique ID or class name, like so: <div class="article-intro-steps"></div>.
Then in your script.js file, include something like the following (it's jQuery, but plain Javascript code can be substituted):
$('.article-intro-steps').prepend('<div>Step 1: Step one goes here.</div><div>Step 2: Step two goes here.</div><div>Step 3: Step 3 goes here.</div>');
Then when you need to change the content, hop into the script.js file and change the prepended HTML code.
-
Thank you, David. That is just a random example I gave. But we have a lot of other instances where the Dynamic Content would be super helpful.
-
Thanks for your help David. I agree with Aswin, dynamic content would be super helpful. My use case may be a little different then Ashwin's.
We have different set of articles, each product requires a different set of starter instructions for Step 1, 2, and 3.
Example:
Product 1 articles share: Steps 1, 2, and 3
Product 2 articles share: Steps A, B, and C
Cons:
- This will require us to constantly update the script.js file. Not all of our writers are equipped to do that.
- Script.js file could be really big in order to accommodate different starter sets.
- Can't upload new image steps to Script.js
-
If this feature is still needed for you, you might decide to give your vote for the formatting option in dynamic content and encourage Zednesk people to upgrade it for us.
Please have a look at my detailed article here:
https://support.zendesk.com/hc/en-us/community/posts/360051636794-Add-formatting-rich-text-editor-to-dynamic-content
Thank you! :)
Please sign in to leave a comment.
6 Comments