---
title: How to Create Global Modules in HubSpot CMS | Developer Tutorial
description: Learn how to build reusable global modules like headers and footers in :contentReference[oaicite:1]{index=1} to maintain consistency across your website.
image: https://www.dnyanesh.co.in/hubfs/Gemini_Generated_Image_xtub64xtub64xtub.png
---

![How to Create Global Modules in HubSpot CMS | Developer Tutorial](https://www.dnyanesh.co.in/hs-fs/hubfs/Global%20Modules%20in%20HubSpot.png?width=1424&height=752&name=Global%20Modules%20in%20HubSpot.png)

Global header Reusable modules Global footer

# How to Create Global Modules in HubSpot CMS | Developer Tutorial

 Dnyaneshwar Zukle

31 March 2026

If you’ve ever worked on a website in HubSpot CMS, you know how repetitive things can get. Updating the same header, footer, or CTA across multiple pages is not fun.

That’s where **Global Modules** come in.

In this guide, I’ll walk you through how to create global modules in HubSpot CMS in a simple and practical way—no complicated jargon, just what you actually need.

## What is a Global Module?

A Global Module in HubSpot is a reusable component that stays consistent across multiple pages.

👉 When you update it once, the changes automatically reflect everywhere.

### Common examples:

- Header / Navigation
- Footer
- Call-to-action sections
- Announcement bars
- Testimonials block

This saves time and keeps your website consistent.

## Why You Should Use Global Modules

Before jumping into the steps, here’s why they matter:

- **Save time** – No need to edit each page manually
- **Consistency** – Same design everywhere
- **Easy updates** – One change = site-wide update
- **Better maintenance** – Cleaner structure for developers

## Step-by-Step: Create a Global Module in HubSpot

Before jumping into the steps, here’s why they matter:

- **Save time** – No need to edit each page manually
- **Consistency** – Same design everywhere
- **Easy updates** – One change = site-wide update
- **Better maintenance** – Cleaner structure for developers

### Step 2: Create a New Module

1. In the left sidebar, click **File → New file**
2. Choose **Module**
3. Give it a name (example: `global-header` or `site-footer`)
4. Select where you want to save it
5. Click **Create**

### Step 3: Convert It to a Global Module

At the top of the module editor:

- Toggle the option **“Make this module global”**

That’s it — now it becomes a global module.

### Step 4: Add Fields to Your Module

Now you define what can be edited inside this module.

Examples:

- Logo (image field)
- Menu (menu field)
- Text (rich text)
- Buttons (CTA)

Just drag and add fields from the right panel.

### Step 5: Write the Markup (HTML + HubL)

Here’s a simple example:

\<header class="site-header"\>

  \<div class="container"\>

    \<img src="" alt="Logo" /\>

    \<nav\>

     

- Menu Item 1 
    - Sub-menu Item 1 
          - Another Item
    - Sub-menu Item 2
- Menu Item 2 
    - Yet Another Item
- Menu Item 3
- Menu Item 4

    \</nav\>

  \</div\>

\</header\>

You can style it using CSS inside the module.

### Step 6: Use the Global Module in a Template

Now go to your template:

1. Open your page template
2. Drag your module into the layout
3. Publish the template

Now your global module is live 🎉

## How to Edit a Global Module

This is the best part.

When you want to update it:

1. Open any page using that module
2. Click on the module
3. Click **“Edit global content”**
4. Make changes and publish

Changes will apply across all pages instantly.

## Best Practices (Important)

To keep things clean and scalable, follow these:

### 1. Use Clear Naming

Bad: `module1`  
Good: `global-footer`, `global-header`

### 2. Don’t Overload Modules

Keep each module focused on one purpose.

### 3. Use CSS Classes Properly

Follow a structure like BEM if possible:

.header {}  
.header\_\_logo {}  
.header\_\_menu {}

### 4. Test Before Publishing

Since it affects all pages, always double-check changes.

## Common Mistakes to Avoid

- Editing global modules without checking impact
- Adding too many fields (makes it confusing)
- Not using global modules for repeated sections
- Breaking layout due to CSS conflicts

## When NOT to Use Global Modules

Avoid global modules when:

- Content needs to be different on each page
- You want page-specific customization
- A/B testing different designs

## Final Thoughts

Global modules are one of the most powerful features in HubSpot CMS for developers.

Once you start using them:

- Your workflow becomes faster
- Your site becomes easier to manage
- And updates become stress-free

If you’re building any serious website on HubSpot, this is something you should absolutely use.

## Share Post

Like247

Bookmark

Share this post

Twitter / X

LinkedIn

Facebook

WhatsApp

Reddit

Copy Link

Post URL

### [![](https://www.dnyanesh.co.in/hs-fs/hubfs/Gemini_Generated_Image_xtub64xtub64xtub.png?width=1376&height=768&name=Gemini_Generated_Image_xtub64xtub64xtub.png) HubSpot CMS HubSpot Development The Complete AEO Guide for HubSpot Websites by Dnyaneshwar Zukle For years, businesses focused on Search Engine Optimization (SEO) to rank higher on Google. Today, users are ... 24 Jun 2026 Read more](https://www.dnyanesh.co.in/blogs/complete-aeo-guide-for-hubspot-websites)

### [![ThemeForest vs HubSpot Marketplace: Which Is Better for HubSpot Websites?](https://www.dnyanesh.co.in/hs-fs/hubfs/ThemeForest%20vs%20HubSpot%20Marketplace%20Which%20Is%20Better%20for%20HubSpot%20Websites%3F.png?width=1376&height=768&name=ThemeForest%20vs%20HubSpot%20Marketplace%20Which%20Is%20Better%20for%20HubSpot%20Websites%3F.png) HubSpot CMS ThemeForest vs HubSpot Marketplace ThemeForest vs HubSpot Marketplace: Which Should You Choose? When building a website on HubSpot, one of the first decisions you'll face is where to get your theme. Two popular ... 17 Jun 2026 Read more](https://www.dnyanesh.co.in/blogs/themeforest-vs-hubspot-marketplace)

<https://www.linkedin.com/in/dnyaneshwar-zukle/> <https://github.com/Dnyaneshwar-zukle> <https://www.instagram.com/mauli.io_>

© 2026 Dnyaneshwar Zukle. Built with precision.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Dnyaneshwar Zukle",
    "url" : "https://www.dnyanesh.co.in/blogs/author/dnyaneshwar-zukle"
  },
  "dateModified" : "2026-03-31T16:00:01.975Z",
  "datePublished" : "2026-03-31T16:00:01.000Z",
  "headline" : "How to Create Global Modules in HubSpot CMS | Developer Tutorial",
  "image" : [ "https://www.dnyanesh.co.in/hubfs/Global%20Modules%20in%20HubSpot.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://www.dnyanesh.co.in/blogs/how-to-create-global-modules-in-hubspot-cms-developer-tutorial",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://www.dnyanesh.co.in/hubfs/Dnyaneshwar-zukle.png"
    },
    "name" : "Dnyaneshwar Zukle"
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "Service",
  "areaServed" : {
    "@type" : "Country",
    "name" : "India"
  },
  "description" : "HubSpot CMS developer specializing in custom themes, modules, HubDB dynamic pages, UI Extensions, CRM Cards, and API integrations.",
  "keywords" : [ "HubSpot CMS", "HubSpot CMS theme development", "HubSpot CMS modules", "HubSpot CRM integrations", "Frontend development" ],
  "provider" : {
    "@type" : "Person",
    "description" : "Frontend and HubSpot CMS/CRM developer specializing in custom themes, HubL modules, dynamic pages, API integrations, and maintainable web experiences.",
    "knowsAbout" : [ "HubSpot CMS theme development", "HubSpot CMS modules and HubL", "HubSpot CRM API integrations", "Frontend development" ],
    "name" : "Dnyaneshwar Zukle",
    "sameAs" : [ "https://www.linkedin.com/in/dnyaneshwar-zukle/", "https://github.com/Dnyaneshwar-zukle", "https://www.instagram.com/mauli.io_" ],
    "url" : "https://www.dnyanesh.co.in"
  },
  "serviceType" : "HubSpot CMS Development"
}
```