KB Templates

Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
edited September 4 in Cireson Uploads

What this does is provide a mechanism to apply consistent styling and templates on a per article-type basis in the HTML KB of the Cireson Portal for Service Manager. I recommend using the loadScript function with a line like this:

loadScript('/CustomSpace/kbTemplates/kbTemplate.js',["KnowledgeBase/Edit","KnowledgeBase/New"]);

The script will add a CSS button to the Analyst Content editor and the End User Content editors that will look for Style.css in the /CustomSpace/kbTemplates/ folder(as you can see from the loadScript line above, the script itself should also sit in that folder).

The script will also add a template button to both editors. Depending on the Article's Type, when clicked the button will look for that type's .html file in the kbTemplates folder(eg FAQ.html) and apply it to that editor.

I hope someone finds this useful!

Comments

  • Philip_HåkansPhilip_Håkans Customer IT Monkey ✭

    This is great, thanks Justin!

    I was working on my own version of this but it was rudimentary at best.This was sorely needed function 😁

  • Mikkel_MadsenMikkel_Madsen Customer Advanced IT Monkey ✭✭✭

    We have testet the function with applying template and it seems to work great. 👍️

    I'm not sure about the css style function - what does it exactly do and when to use it?

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    @Mikkel_Madsen - The CSS button is for applying a consistent styling to your articles if you choose. It also helps to apply the styling to existing articles. If you have a Style.css file in the kbTemplates folder, the button will apply that CSS to the article.

  • Mikkel_MadsenMikkel_Madsen Customer Advanced IT Monkey ✭✭✭

    Could you provide an example? 🙂

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    Before CSS Button:

    After CSS Button:

    Contents of Style.css:



Sign In or Register to comment.