HubL supported variables
HubSpot templates can use a host of predefined variables that can be used to render useful website and email elements. This page is a reference listing of those variables. You can learn more about creating your own variables in a HubL template or module, here.
While most of the variables listed on this page are optional, there are a few variables that are required, in order to create emails and pages from your templates.
Required page template variables
In order to publish a coded file as an editable page or blog template, the following variables must be included. If you want to publish an HTML file without these variables, to use within another template, you can do so unchecking the option "Make this template available for new content."
Variables available in all templates
There are many predefined HubSpot variables that can be used in email, page, or blog templates. Below is a list of these variables.
The following variables will render on any type of content.
Color and font settings
There are several basic color and font controls in Content Settings > Colors and Fonts that can be printed to templates and files. Please note that if you use these variables in CSS files, you will need to republish/recompile your CSS file when you change one of the settings, in order for the new color to apply.
The following variables are specifically for HTML email templates or HubL template modules in email layouts.
Website pages variables
The following variables are available for site pages, landing pages, system pages, and blogs.
HTTP request variables
The following variables print information about the HTTP page request.
The following variables are available for blog templates. Some variables are only available for post listings, while other's may only be available for blog posts.
blog_author.avatar, blog_author.bio, blog_author.display_name, blog_author.email, blog_author.facebook, blog_author.google_plus, blog_author.has_social_profiles, blog_author.linkedin, blog_author.twitter, and blog_author.website
content.blog_post_author.avatar, content.blog_post_author.bio, content.blog_post_author.display_name, content.blog_post_author.email, content.blog_post_author.facebook, content.blog_post_author.google_plus, content.blog_post_author.has_social_profiles, content.blog_post_author.linkedin, content.blog_post_author.slug, content.blog_post_author.twitter, and content.blog_post_author.website