In the design manager tool, you can create custom coded modules to add custom or advanced features to your blog, pages, or emails. The module editor has three editor panels for writing HTML and HubL, CSS, and JavaScript. Custom modules offer a wide range of functionalities so that content can be fully customized within the page, email, or blog editor. You can build custom modules from scratch or add pre-built modules to your account from the HubSpot Marketplace.
Please note: creating modules requires knowledge of HTML, CSS, HubL and the HubSpot design manager. It's recommended to work with a designer to create coded modules.
Please note: there are technical differences between these module types that make them incompatible. For example, CSS and JavaScript will be disabled if you select Email templates for email compatibility.
In the Content Options section, you can add default content that appears when the module is used in templates and content editors. The options for default content will differ depending on the field type.
In the example below, the field type is an image field, so the default content options are to select a default image and hide size controls.
In the Editor Options section, you can enable the following options:
You can customize a module field to only appear if another field meets certain criteria with field display conditions.
In the example below, display conditions are being set for an image field. The condition is that the value in image_title (a text field) must be equal to Headshot in order for the image field to appear in the module.
The display conditions will be automatically enabled once you've set a condition. To disable the display conditions, click the toggle switch on the right of Display Conditions.
Lastly, you can set repeater options for your field. Repeaters are fields and groups that can create multiple objects and display them using a for
loop.
In the example below, the image field is being set up as an image slider. The object count limits are set so a minimum of 3 image fields will appear in the module, up to a maximum of 5 image fields. A user will see 4 image fields appear in the module by default, and can choose to add one more image field or remove one existing image field.
The repeater options will be automatically enabled once you've modified one of the options. To disable the repeater options, click the toggle switch on the right of Repeater Options.
Learn more about field repeating and loops in the designer documentation.
You can preview how your module will appear and work in a content editor by clicking the Preview button at the upper right of the module editor. The preview of your module will open in a new tab. This preview syncs with the editor and will automatically refresh as you work.
Once you're done adding fields, writing your module syntax, and are satisfied with how the module appears and works in the preview, you can proceed to publish your module. In the upper right, click Publish changes.
In addition to creating your own modules, you can add or purchase custom modules that other users or providers have created in the HubSpot Marketplace.