Using Dynamic Content in articles


  • Don

    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.

  • David Bjorgen

    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>&copy; <span class="copyrightYear"></span> Your Company Name</span>


  • David Bjorgen

    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.

  • Aswin Kannan

    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.

  • Don

    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.


    Product 1 articles share: Steps 1, 2, and 3

    Product 2 articles share: Steps A, B, and C



    • 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
  • Tom

    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:

    Thank you! :)


Please sign in to leave a comment.

Powered by Zendesk