Liquid Global Objects
Global liquid variables
Table of Contents
Verification variables User / Account variables Template variables Content variablesBelow is the complete reference list of global objects available in the template engine. These objects can be grouped into the following categories for easier understanding and implementation:
- Verification variables — Provide information about the current page context.
- User / Account variables — Provide information about the logged-in user and the knowledge base account.
- Template variables — Provide data related to template assets and rendering.
- Content variables — Provide access to commonly used content collections.
Verification variables
These variables describe the current page context. They are commonly used to dynamically assign HTML classes, apply conditional styling, or render specific sections depending on the page type. They are also useful when building Contextual Sections.
-
on_show_question_page — Returns
trueif the current page is a question page. -
on_index_page — Returns
trueif the current page is the index (homepage). -
on_contact_us_page — Returns
trueif the current page is the contact page.
User / Account variables
These variables expose information about the logged-in user and the knowledge base account. They are useful for personalization, permission-based rendering, and dynamic navigation elements.
- account — Object containing properties related to the KB account.
- account.name — Returns the account name.
- account.main_js_url — Returns the URL of the main JavaScript file.
- account.main_css_url — Returns the URL of the main CSS file.
- internal_kb_user — Object containing data about the logged-in user.
-
current_user — Alias for
internal_kb_user. - current_user.first_name — Returns the user’s first name.
- current_user.last_name — Returns the user’s last name.
- current_user.email — Returns the user’s email address.
- current_user.role_id — Returns the user’s role (e.g., Admin, Viewer).
Template variables
These variables provide access to template-level assets and rendering helpers. They are required when integrating default scripts, injecting custom assets, or ensuring each page loads its required functionality.
- javascript_includes — Returns a string containing the template’s main JavaScript bundle.
- responsivemenu_js — Returns JavaScript responsible for the mobile menu behavior.
- typewatch_js — Returns JavaScript used for search monitoring functionality.
- questions_js — Returns JavaScript responsible for fetching and displaying search results.
- default_main_js — Returns the default main JavaScript file.
- main_js — Returns the custom JavaScript file defined for the template.
- main_css — Returns the custom CSS file defined for the template.
- content_for_layout — Outputs the rendered content of the current page and injects it into the template layout.
Content variables
These variables provide structured access to commonly used content collections. They are especially useful for building reusable UI sections such as featured lists or dashboards. For implementation examples, see Standard Sections.
- recent_updates — Returns a list of the 20 most recently created or updated questions.
- root_questions — Returns all questions located at the root level (dashboard level).
- categories — Returns all categories in the KB, including nested child categories.
- roots_categories — Returns only top-level categories directly under the KB.
- top_questions — Returns the 20 most frequently visited questions.
-
most_popular_questions — Returns the same list as
top_questions. - latest_questions — Returns the 20 most recently updated questions.