1. Student Help Center
  2. Definitions
  3. Content Management System (CMS)

What is HubL?

Introduction to CMS

HubL

The CMS uses a markup language called HubL.  Thus, HubL is a markup or templating language.  HubL provides standardized access to data without having to use a full-fledged programming language.      

HubL is not necessary for basic, out-of-the-box functionality.  Yet, HubL is an important part of building custom modules.  It is important if you are creating custom templates.  

HubL code is written within braces -- { }. HubL has statements, expressions, and comments.  Statements do something, like define a variable.  Expressions evaluate to a value like outputing a blog author.  Comments are for the developer and are not rendered.   Macros are similar to functions.  Conditional statements use the if / else / endif logic.  Loops use the for / endfor snytax.  

Examples:

  • Statement --
  • Expression -- I am a string
  • Comment --  
  • Macro -- 
    • { % macro add_numbers (n1, n2) % }
            { { n1 + n2 } }
      { % endmacro % } 

      { { add_numbers (4, 5) } }