Skip to Content

Hiding HubSpot modules on mobile/desktop at template level

⚠️ Note that this post hasn't been updated for at least a year and the information may be outdated, proceed with caution! (Last updated: July 14, 2023)

Hiding a module based on your responsive breakpoints can be very useful.
On the page editor, you can hide modules for a specific view by selecting "Edit for mobile" / "Edit for desktop" and then clicking the "Hide this module" icon on the specific module you want to hide.

 

edit step1

 

edit step2

 

But did you know you can also achieve this at template level? It works the exact same way as setting different padding/margin for a section on a template:

{% dnd_module
   path="@hubspot/rich_text",
   hidden={ "default":false, "mobile":true }
%}

{% end_dnd_module %}

 

That will hide the given module on mobile but show it on desktop!

←  Previous Article

Get HubSpot posts that contain all tags (Tag A AND Tag B AND Tag C)

Next Article  →

Find the deals associated with a contact on a HubSpot membership page

Contact

Get help from a HubSpot CMS Expert

  • Custom HubSpot themes and reusable and easy-to-use HubSpot templates and modules
  • Technical support and guidance on the HubSpot CMS