Assistance with Automatically Connecting HubDB Table to Blog Listing Module

Hello HubSpot Developers, I am currently working on customizing a blog listing page on our HubSpot CMS and need some assistance with integrating a HubDB table to dynamically manage the blog content displayed within different tabs (e.g., E-commerce, Sustainability, Mail, etc.).

I would like each tab to automatically display the last 6 blog posts from specific categories, managed through a HubDB table, with a “See More” button linking to the full category page. Could you please provide guidance or examples on how to set up the HubDB table to automatically sync and filter blog posts by category in the Blog Listing module?

Additionally, I am looking to ensure that this setup can dynamically update as new blog posts are added to the respective categories. Any tips on setting up the connection between the HubDB table and the blog listing to facilitate this would be greatly appreciated.

Thank you for your assistance.

Hi @DPuntriano,

Is there a reason why you specifically need to use HubDB?

If main the goal is to separate posts by their categories into different tabs, you could save some effort and use the blog_recent_tag_posts function. It pulls in most recent posts by default and allows you to filter which categories you would like to show.

Example fof pulling 6 most recent posts from the “Sustainability” category:

{% set tag_posts = blog_recent_tag_posts("default", "sustainability", 6) %}
{% for tag_post in tag_posts %}
 <div class="post-title">{{ tag_post.name }}</div>
{% endfor %}