Dynamic pages overview
Dynamic pages are CMS pages that get their content from a structured data source, such as HubDB or CRM objects. Based on how you configure your dynamic page template or modules, HubSpot will then use that data to automatically create and populate a set of pages. This includes a listing page that displays summaries of the data, and individual pages for each data source entry (HubDB row or CRM object record).
Depending on the data source you choose, there are different prerequisites, advantages, and content creation experiences. Below, read about each data source and how to choose which one is best for you.
In HubSpot, CRM objects represent the different types of records and relationships your business has. Standard CRM objects include contacts, companies, deals, and tickets. With an Enterprise subscription, you can also create custom objects. Using any of these CRM objects, you can create a listing page and individual details pages for each record of the object type you choose.
For example, a car dealership could store their inventory as records with a custom Car object. Then, using CRM object dynamic pages, they could list their inventory online with a unique page automatically created for each car. When a new record is created under the Car object, a new page will be created automatically, keeping the inventory and website in sync.
You may want to use CRM objects as your data source if:
- You want to associate records to other CRM objects, such as contacts.
- You want to create automation or personalization based on the object.
- It simplifies your businesses processes and record keeping.
To build CRM object dynamic pages, you’ll need:
- CMS Hub Professional or Enterprise.
- To build using Custom Objects you'll need either CMS Hub Enterprise, or Marketing Hub Enterprise with CMS Hub Professional.
- An understanding of how to create custom modules.
- A standard or custom object as a data source.
After you create your dynamic content modules, they can be inserted into any page that includes a drag and drop area. To edit how the data is displayed, you'll need to update the modules or template you've created. If the template includes any other drag and drop areas, you can edit the page's non-dynamic content within the page editor. Any updates made to the dynamic or non-dynamic content will apply to both the listing page and the details pages, similar to editing a template.
Because the dynamic page content is coming from CRM object records, you manage dynamic page content the same way you would manage other CRM records. For example, you can edit dynamic page content by editing or deleting individual records in HubSpot. Similarly, you can manage content in bulk by importing or bulk editing records.
The type of pages you can create depends on the object you choose:
- Public pages can be built using the following objects:
- Marketing events
- Custom objects
- Private pages (password protected or member registration) can be built using the following objects:
It’s important to be aware of automation that’s set up for the CRM object you choose. For example, if you have a workflow that automatically updates a custom object record’s name based on associated deal stage, your dynamic page content will also be updated any time the record’s name changes.
To start building CRM object dynamic pages, check out the developer guide for building CRM object dynamic pages.
If you plan to use custom objects as your data source, learn how to create and manage custom objects through HubSpot’s API.
Using HubDB, you can generate dynamic pages from the rows of a HubDB table. You can also use child tables to create nested pages that map to separate blogs or listing pages of your website. When you enable a HubDB table as a data source, you can select which columns to use for the meta description, featured image, and canonical URL.
You may want to use HubDB as the data source for your dynamic pages if:
- You don’t need to associate data from your tables with your CRM data.
- The HubDB technical limits are not an issue for your use-case.
After you create and enable your HubDB table for dynamic page content, you manage the content of your pages by creating, editing, and deleting HubDB rows. You can edit HubDB tables directly in your HubSpot account, or you can edit your schema externally then upload the data via a CSV or through the HubDB API.
To edit how the data is displayed, you'll need to update the modules or template you've created. If the template includes any other drag and drop areas, you can edit the page's non-dynamic content within the page editor. Any updates made to the dynamic or non-dynamic content will apply to both the listing page and the details pages, similar to editing a template.
If you have a setup where you'll need unique versions of each page URL while the content of the page remains the same across all versions, you should use query string parameters instead of dynamic pages.
When using dynamic pages, instances of your content are generated for every instance of a HubDB table or CRM object, but if the content is identical across all your pages, you will be flagged for duplicate content by search engines. This will lead to a scattered sitemap, a confusing website search experience, and extra entries in your website's page analytics.
By using query string parameters, you can accomplish the same goal of having a unique URL per referrer. You can even dynamically show unique content on a page if needed, but there won't be a dynamically generated page per instance of a HubDB table or CRM object; instead, there will only be one page with dynamic content that's shown based on the query string parameter.
Depending on whether you're using a HubDB table or CRM object as your data source, you'll need to use a different HubL function to query for the associated data in your account.
Consult the code snippets below, which both parse the logo ID from a URL such as
The HubL code below checks whether a
logo_identifier parameter is present in the query string, then uses the
crm_object HubL function to fetch the data that corresponds to the associated logo record, which was created as a custom object.
The HubL code below parses the
logo_identifier parameter in the query string, then uses the
hubdb_table_rows HubL function to fetch the logo's URL from the associated HubDB table (e.g., a table with an ID of
10181541) using the logo ID from the query string.
Or you can also invoke the
hubdb_table_row function, though you'll need to pass the row ID in the query parameter.
Thank you for your feedback, it means a lot to us.