0

I'm trying to add a custom module in a coded template in Hubspot, but cannot find any documentation or answers how to do that. Is that even possible?

Custom module: An example of a custom module can be any HTML component, I will add a simple text as example, module is called "Hello world":

<p>Hello world</p>

Coded template: For example, let's say I have a coded template like this:

<html>
<head>
  <title>{{ content.html_title }}</title>
    {{ standard_header_includes }}
</head>
<body>
    <!-- I want to add custom module here, but how? -->
    {{ standard_footer_includes }}
</body>
</html>

Is there a way to add this custom module to a coded template?

Matteo Enna
  • 1,285
  • 1
  • 15
  • 36
gradosevic
  • 4,809
  • 2
  • 36
  • 51

1 Answers1

1

Custom modules can be embed using HubL statements.

For example, to display custom module with the title "Hello World" you can use such code:

<body>
    <!-- Custom module -->
    {% custom_widget "any_unique_id" widget_name='Hello World' %}

    {{ standard_footer_includes }}
</body>

Check HubL Reference for more information - https://designers.hubspot.com/docs/hubl/hubl-supported-modules

Pavel K
  • 261
  • 2
  • 5