Developer Announcements

AJLaPorte
HubSpot Product Team
HubSpot Product Team

Local Module Development: “host_template_types” property is being replaced with “content_types”

What’s Changing and why?

The host_template_types array property for modules is being replaced with the content_types array property. The new content_types property is more robust and will allow for greater specificity regarding where modules can be used. Possible values for content_types include:

 

  • "ANY" = Any of the areas listed below
  • "LANDING_PAGE" = Landing pages
  • "SITE_PAGE" = Site pages/templates
  • "BLOG_POST" = Blog posts/templates
  • "BLOG_LISTING" = Blog listing templates
  • "EMAIL" = Emails and Email templates
  • "KNOWLEDGE_BASE" = Knowledge base pages/templates
  • "QUOTE_TEMPLATE" = Quotes templates
  • "CUSTOMER_PORTAL" = Customer Portal templates
  • "WEB_INTERACTIVE" = Web interactives
  • "SUBSCRIPTION" = Subscription templates
  • "MEMBERSHIP" = Membership templates

If a module is not to be used in any area within HubSpot, you would set the value to an empty array [] instead of ["NONE"].

 

You can view these values on our Configuring a Module page within the developer documentation.

 

Below is an example of the new content_types property in meta.json of a module:

 

{
  "global" : false,
  "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ],
 "content_types" : ["SITE_PAGE", "BLOG_POST", "BLOG_LISTING", "QUOTE_TEMPLATE", "WEB_INTERACTIVE"]
  "module_id" : 136785808220,
  "is_available_for_new_content" : true
}

 

What will happen to my existing modules?

Existing modules will not be affected initially as updates to the host_template_types property will sync to the content_types property allowing it to be updated accordingly while this change is rolled out. Developers should begin adopting this new property as the new values for content_types indicated above will not be available for the legacy property of host_template_types

 

When is this happening?

We are gradually rolling out this change over the next few weeks. Starting January 29th, 2024, all accounts will begin referencing this new property when assessing if a module will be available for use within areas inside of HubSpot (Email editor, Website page editor, etc…). 

2 Replies 2
PierreND
Participant

Local Module Development: “host_template_types” property is being replaced with “content_types”

Hello, today is 2024, Jan 30th and the `content_types` property is not available yet on our environment.

It was stated that:
Starting January 29th, 2024, all accounts will begin referencing this new property when assessing if a module will be available for use within areas inside of HubSpot

This is annoying because we then have a lot of errors `Error: CSS and Javascript are not allowed on email modules` when trying to push to our QA Hubspot environment. It's like `content_types` is not considered at all.

Do you know when `content_types` will be usable?

SSharples
Contributor | Elite Partner
Contributor | Elite Partner

Local Module Development: “host_template_types” property is being replaced with “content_types”

Any clues as to what WEB_INTERACTIVE might include?

0 Upvotes