Learn how to hide modules and sections in the page editor for your custom theme.
theme.json
to hide specific modules and sections from the editor. This enables you to curate the list of modules and sections available to content creators when building pages, blogs, and global content, rather than having all modules and sections appear for all content types. Using this feature, you can also hide HubSpot default modules in favor of your own versions.
You can hide modules and sections in the following ways:
'
). For example, '@hubSpot/follow_me'
. This complies with YAML, which template annotations are based on."hide_all_default_modules": true
in the theme.json
file
To hide specific default modules in a theme, you’ll need to add a list of hidden modules to a hidden_modules
array in the theme.json
file.
For example, if you wanted to hide HubSpot’s default button and form modules from a theme, your code would look like the following:
"hide_all_default_modules": true
in theme.json
.
hiddenModules
and hiddenSections
in the template annotations. For example: