How to add videos to dynamic pages in HubDB

Last updated:
APPLICABLE PRODUCTS
  • CMS Hub
    • Professional or Enterprise

dynamic website page is a CMS page whose content changes based on the path of the URL requested by an end user. HubDB already allows you to store, filter, and display data in your HubSpot website pages. Multilevel dynamic pages take this concept further, allowing you to create up to five levels of pages within one dynamic template.

Each dynamic page includes its own unique, SEO-friendly URL, and offers page-specific analytics. 

This tutorial assumes you already have multiple HubDB tables created. Please see the HubDB documentation if you are unfamiliar with HubDB or want to create your first HubDB tables.

1. Add a 'VIDEO' column to your table.

Navigate to HubDB in your HubSpot portal, and edit the table you would like to be a parent of other tables. Click "Add new column" and create a column with type "Video".

HubDB add column modal showing video column type selected

2. Select videos for each row.

You can now add a video to your row by clicking the "choose" button in the video column.

insert video interface screenshot

Selecting a video will store the video player_id as the column value in the row. The file thumbnail is used to visually represent the video in the UI.

HubDB UI with videos selected

3. Add the video player widget to your dynamic template

You can now reference the row data in your dynamic template to build a video_player tag.

{% if dynamic_page_hubdb_row %} {% video_player "embed_player" player_id="{{dynamic_page_hubdb_row.video}}" %} {% endif %}

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.