Change your Help Center design using Dynamic Content (Guide Professional) Follow

Comments

11 comments

  • Avatar
    Andreas Schuster

    Is it possible to use dynamic content in an help center article as well?
    For example localized URLs?

  • Avatar
    DeShawn Witter

    @Andreas

    Dynamic Content placeholders will not work in articles, unfortunately. As a workaround, you can remove the language identifier from the URL (en-us, for example) and it should display in the language chosen by the end-user. I hope this helps answer your question!

  • Avatar
    Eva Wilhelmsson

    Hi, 

    I get an error messade that it's not possible to save because of the unvalid reference on row 3 (my {{dc.welcome}} ). I creates one dc in swedish and one in english, can that be the problem? 

  • Avatar
    Jessie Schutz

    Hi Eva!

    Did you create two separate dynamic content items, or one dynamic content item with two variants? I think that if you have two different DC items with no variants the placeholders won't work.

  • Avatar
    Mario Valdes

    Hi @Eva I was having the same problem, in order to fix it you should call your dynamic content as follows:

    {{dc 'welcome'}}

    That is, replace the . for a space and use sigle quotes around your dynamic contente title.

    Hope this helps, cheers.

  • Avatar
    Anil Kumar

    Hello,

    Can we use dynamic content in JS file?

    Thanks

  • Avatar
    EJ Hernandez

    Hi Anil,

    I'm afraid that it is not possible to use dynamic content in a JS file.

    As a workaround, what you can do is to create a hidden input field and within that place the dynamic content as its value. Make sure to create an ID for that so that you may use that as a reference in your JS file. I hope that helps.

  • Avatar
    Jacob J Christensen

    This is awesome! Thanks Arnaud!

  • Avatar
    Vladan Jovic

    The only way to use DC in JS is if we put JS code into HTML script tag on any of pages (or header/footer). 
    The same thing is about using DC into CSS (putting CSS in HTML with style tag). eg:

    <style>
    h1.welcome-note {
    color: {{dc "color_font"}};
    }
    </style>
  • Avatar
    Jake Cahill

    Hi Vladan,

    Does this mean that if you use dynamic content in JavaScript in a <script> tag, you could use JS to replace content in your article with dynamic content when it's published?

     

    For example, you could write something like this in the WYSIWYG editor:

    "Use {{menu}} to delete a comment".

    Then use JS in the template to replace {{menu}} with some dynamic content?

  • Avatar
    Vladan Jovic (Edited )

    Hey Jake, unfortunately, it will not work on that way, cause you can't use DC as article content (in the WYSIWYG editor). We can put DC in article HTML template but in that case, DC item will be visible to any of articles.

Please sign in to leave a comment.

Powered by Zendesk