COS-General

What are the differences between Custom HTML, HubL Template, and Custom modules?

Last updated: November 28, 2016

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A

When adding custom code to a template layout, you have several options to choose from with regards to which module type of module to add that code to. Below is a description of each of these modules and when to use them:

Custom HTML modules

Custom HTML modules are editable HTML areas that content creators can modify at the page level. These modules are ideal for inserting embed codes or any other HTML that the end user may need to manipulate in the content editor. While these modules support HubL, if you are defining modules using HubL, you will want to make sure to lock the module. 

  • HTML modules prove ideal for embed codes such as YouTube or social media snippets.
  • If unlocked, they are editable at the page level.
  • HTML modules can be made global (but any HubL modules defined in a global module will not be editable at the page level).
  • A locked HTML modules is essentially the same as a HubL template module.

HubL Template module

HubL Template modules are generally used if you need to define other modules using HubL within the grid of a template layout.

  • These modules are ideal for defining other modules within the responsive grid of a COS template layout. 
  • HubL template modules are always locked and their code is not editable at the page level.
  • Modules defined in the default content of these modules are editable at the page level.
  • A locked HTML modules is essentially the same as a HubL template module.
  • These modules cannot be made global.

Custom Module

Custom modules are reusabled modules that support 5 types of user-editable fields, as well as HTML. These modules are ideal for creating coded sections of the page that still allow user's to make edits at the page level.

  • These modules can be used repeatedly on a template, allowing users to edit each module independently in the content editor.
  • Custom modules are designed to use the 5 simple field types displayed in the editor. These fields use a simplified syntax and render within the custom modules options in the content editor.
  • While these modules support all HubL, HubL modules defined in a custom module will render in the Edit Modules pane of the editor, rather than within the custom module's options in the content editor.