US English (US)
BS Bosnian

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Book a Demo
  • Product Updates
  • Contact Us
English (US)
US English (US)
BS Bosnian
  • Home
  • Customization
  • Customization Guides
  • Liquid Templating Basics

Shopify/Liquid Global Objects

Global liquid variables

Written by Guilherme Arantes

Updated at August 17th, 2022, by Amanda Stançani

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Users Accessibility New to Helpjuice? Start Here Content Management Multiple Languages/Translations & Localization Multilingual Knowledge Bases Analytics Video Tutorials
  • Customization
    Customization Guides
  • API V2
  • API V3 and Webhooks
  • Article Editor
  • Billing / Subscription
  • Authentication
  • Pricing
  • Swifty AI Chatbot
  • Swifty AI Helpbar
  • What's New
+ More

This is the complete list of the global objects available on the template engine. Initially, the global objects can be grouped by:

  • Verification variables: Information about the current page;
  • User/Account variables: Information about the user and the knowledge base account;
  • Template variables: Information related to the template;
  • Content related variables: Information related to the most useful groups of content.


Verification variables

Information about the current page, useful to create html class names to control different design for different page types and to create Contextual Sections.

  • on_show_question_page: Variable that returns a true value if the current page is a question;
  • on_index_page: Variable that returns a true value if the current page is the index page;
  • on_contact_us_page: Variable that returns a true value if the current page is the contact-us page;


User/Account variables

Information about the user and the knowledge base account. Useful to create internal navigation links and control different design for different user accounts.

  • account: Object that returns a list of properties related to the KB account;
  • account.name: Text Object that returns the account name;
  • account.main_js_url: Text Object that returns the main_js file address;
  • account.main_css_url: Text Object that returns the main_css file address
  • internal_kb_user: Object that contains the info on the logged in user;
  • current_user: Same as internal_kb_user;
  • current_user.first_name: Text Object that returns the user's first name;
  • current_user.last_name: Text Object that returns the user's last name;
  • current_user.email: Text Object that returns the user's email address;
  • current_user.role_id: Text Object that returns the user's role (Admin, Viewer etc);


Template variables

Information related to the template. Needed to integrate the default scripts on the template and include the specific code for each page.

  • javascript_includes: This Object is specific for the template and it returns a string containing the main JS;
  • responsivemenu_js: This Object is specific for the template and it returns a string containing the javascript files responsible for the mobile menu;
  • typewatch_js: This Object is specific for the template and it returns a string containing the javascript files responsible for the monitoring of the search block;
  • questions_js: This Object is specific for the template and it returns a string containing the javascript files responsible for the fetching and displaying of questions after performing a search;
  • default_main_js: This Object is specific for the template and it returns a string containing the default main js file.
  • main_js: This Object is specific for the template and it returns a string containing the custom js file. See more about this file here.
  • main_css: This Object is specific for the template and it returns a string containing the custom css file. See more about this file here.
  • content_for_layout: This Object fetches the contents on the current page as a text and paste it over the template code


Content related variables

Information related to the most useful groups of content. Useful to create the standard sections. See more about the Standard Sections.

  • recent_updates: Returns a list with the 20 recently updated/created questions;
  • root_questions: Returns a list with the all questions on the root level (the dashboard);
  • categories: Be careful this object fetches all the categories under your KB, non-exclusively, which means that you would also get all the child categories;
  • roots_categories: A more focused object returns only the immediate categories under your KB;
  • top_questions: Returns a list with the 20 most frequently visited questions;
  • most_popular_questions: Returns the exact same list;
  • latest_questions: Returns the 20 recently updated questions.
variables e-commerce

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Privacy Policy (GDPR Updated)
  • Shopify/Liquid Filter Syntax

Copyright © 2025 - Helpjuice

Helpjuice, Inc. is a registered US Corporation, EIN # 45-2275731

Download W9
  • Help
  • Features
  • Pricing
  • About
  • Careers
  • Customers
  • Blog
  • Case Studies
  • Resources
  • Knowledge Base Examples
  • Privacy Policy
  • Terms of Service

Why is the knowledge base important?

With a knowledge base, you can allow your customers to self-help themselves, thus reducing your customer support by up to 60%. Furthermore, you can also have your team get instant answers to the questions they need without having to email themselves all using knowledge base software.

What is the purpose of a knowledge base?

The purpose of knowledge base software is to allow you to host your knowledge base/corporate wiki in one centralized 'hub'. Both your customers, and employees can now access information within seconds!

Made with from Miami, Bosnia, Morocco & Brasil

+1 (833) 387 3877 support@helpjuice.com
Expand