HubSpot CMS templates are written in HTML and HubL. These templates are capable of containing regions that are friendly for content creators to edit themselves.
<link rel="stylesheet" type="text/css" href="https://developers.hubspot.com/docstheme.css">
, you should include the stylesheet through css_assets
in the module’s meta.json file. This enables HubSpot to conditionally load the CSS only when the module is present on a page, minimizing the amount of unnecessary CSS loaded.
Learn more about optimizing your HubSpot development workflow.
Annotation | Type | Description |
---|---|---|
templateType | String | Specifies which template type a file is. Values include:
|
isAvailableForNewContent | String | Specifies if a template is available for selection in the content creation process. Values include: true , false .Templates set to false do not need to include the required variables. Templates of the page type that are set to false can also be used as standard partials. |
enableDomainStylesheets | String | Specifies if the template should load domain stylesheets. Values include: true , false . |
Label | String | User-friendly description of the template, displayed in the template selection screen. For example, About Page , Homepage , Pricing . |
screenshotPath | String | The screenshot to display when a content creator is selecting a template. This screenshot should make it easy to differentiate between your templates. |
{{ standard_header_includes }}
- Used to intelligently add combined and minified required CSS.{{ standard_footer_includes }}
- Used to intelligently add javascript to the bottom of a page dynamically, for things like the HubSpot tracking script, and modules.templateType: page
isAvailableForNewContent: false
global_partial
tag.
Global partials must include the annotation templateType: global_partial
at the top of the file.
standard_header_includes
and standard_footer_includes
variables. Within that template, you define a unique block using the following syntax where body
is a unique name:
body
block.