Helpjuice's Template Engine

Helpjuice's Template Engine is based on Liquid and nine default files

5217a53eb06396a4f9289ae6941cef62

Written By Guilherme de Andrade Arantes (Administrator)

Updated at October 22nd, 2017

A Template Engine replaces variables in the template files with actual values, and transforms the template into the final file. Helpjuice's Template Engine is based on Liquid and nine default files.

These files contains all the code needed to display the support site completely such as HTML code for different page types, javascript and css files.

The knowledge base is rendered using the following template files:

  • Main CSS: Is the CSS stylesheet, this basically defines the looks on the page, by default it is already normalized, and ready to use on your knowledge base, you can create new CSS rules to customize it as well as erase old ones;
  • Main JS: Some of the KB already have a Main JS with some instructions although the newer users might find it empty. This document can be used to change the interactions with the Helpjuice KB, new functionalities and custom redirections;
  • Robots.txt: This is the text archive used by Search Engines such as Google, Bing and Yahoo. You can choose which folders will be crawled by them, and which won't;
  • Main Layout: This documents defines most of the looks on the KB, this archive is loaded for every single page, the liquid tags that define which layout parts will be loaded according to where the user is;
  • Index Page: The landing page, the first visited page, all the content defined on this document shows up when you access the Helpjuice KB;
  • Question Page: This page is loaded specifically when a user access a question, over the index, category, search or any other way, if is a question it uses this layout;
  • Category Page: Can be accessed over the Index Page, or by breadcrumbs slugs. This layout refers to all the category pages, subcategories included;
  • Contact Page: This can only be accessed over a direct link or a button to “contact support” or “contact us”, this form sends the info to the email address registered on the settings, although it is not the same form that appears when no search results were found;
  • Thanks Page: The page that comes up after sending the contact form.


How the Engine works

When any page of the Knowledge Base is accessed, the Template Engine will load the Main Layout file and render its values.

Notice the highlighted section on the above image. This area represents the concept of a Layout Content. Each page type has a different concept on the site:

In the end, the complete page is a result of the Main Layout + Layout Content for that specific page.


Contextual Sections

If you want to display Contextual Sections outside of the Layout Content scope, check the Contextual Sections Guide.

Was this article helpful?