# When to use HubDB?

**URL:** <https://community.hubspot.com/t/when-to-use-hubdb/28325>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [November 23, 2020, 6:15am UTC](https://community.hubspot.com/t/when-to-use-hubdb/28325 "2020-11-23T06:15:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michiel\_Tob](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/michiel_tob/32/13631_2.png) [@Michiel\_Tob](https://community.hubspot.com/u/Michiel_Tob)\
**Post date:** [November 23, 2020, 6:15am UTC](https://community.hubspot.com/t/when-to-use-hubdb/28325/1 "2020-11-23T06:15:47Z")

</div>

Hi,

I am completely new at Hubspot and wonder when HubDB can/should be used in the best way.

For the website I have to make I have 3 almost identical page types of cases/news/events. Each type has its own overview page of all existing pages of that type. Each case/news/event also has its own detail page.

On other pages of the website there are references to these pages with an image, a short description of the case/event/news and a cta to the detail page.

What is the best way to set up these pages. Does HubDB qualify for this because I have data that needs to be displayed on multiple pages?

Kind regards,

Michiel

PS: if my question was not clear enough, you can always take a look at [https://www.tobania.be](https://www.tobania.be).

---

<div class="post-metadata">

**Author:** ![Gonzalo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gonzalo/32/106671_2.png) [@Gonzalo](https://community.hubspot.com/u/Gonzalo)\
**Post date:** [November 23, 2020, 8:51am UTC](https://community.hubspot.com/t/when-to-use-hubdb/28325/2 "2020-11-23T08:51:22Z")

</div>

Hi [@Michiel\_Tob](https://community.hubspot.com/t5/user/viewprofilepage/user-id/151377) ,

I don’t think there is a specif time to use HubDB, like there aren’t fixed rules or laws about it 🙂

Comparing vs a blog, I like to use HubDB when most of this points doesn’t match:

- The content won’t change that often (because UX for the editor is not as nice as the blog post editor).
- Most of the info I am going to use are custom properties. This point will neutralize the previous one, because if you have a blog object with a lot of customizations, edit each property/content withing the sidebar editor starts to become a bit anoying too 🙂
- I don’t need pagination (or just a simple one, but for HubDB we will need to make our own with AJAX, not full slug pages as in blog /page/2 but ?page=2 for example).
- I need an advance pagination/filtering, maybe combining categories, or properties. Or even one like for events: display future events but not already past. So for this case if you use a blog you will be limited to generate the pagination with the latest 255 posts, while in hubDB I think there is no limit.

As you can see, even with this, there is not an exactly breaking point for me but a gradient where something can be in between.

So in your case, I would say that probably:

Blogs: Cases & News

HubDB: Events

For linking those listings to other pages you are going to need:

`hubdb_table_rows("test_table", "foo=bar&orderBy=foo")`

[+info](https://developers.hubspot.com/docs/cms/features/hubdb#hs_cos_wrapper_widget_1581043928100)

For the blogs, you can either use the default:

`related_blog_posts blog_ids="3241539189,3261083894", limit=6, blog_authors="Frank Smith"`

or build your own with:

`blog_recent_tag_posts('default', 'marketing-tips', 5 )`

[+info](https://developers.hubspot.com/docs/cms/guides/creating-a-related-post-listing)

Best,

G

---

<div class="post-metadata">

**Author:** ![Michiel\_Tob](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/michiel_tob/32/13631_2.png) [@Michiel\_Tob](https://community.hubspot.com/u/Michiel_Tob)\
**Post date:** [November 23, 2020, 2:19pm UTC](https://community.hubspot.com/t/when-to-use-hubdb/28325/3 "2020-11-23T14:19:06Z")

</div>

Thank you for your reply @Gonzalo ,

I’m going to test if it can be done your way so I can see which method is best for what I need.

Greetings,

Michiel

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [November 23, 2020, 9:09am UTC](https://community.hubspot.com/t/when-to-use-hubdb/28325/4 "2020-11-23T09:09:58Z")

</div>

Hello [@Michiel\_Tob](https://community.hubspot.com/t5/user/viewprofilepage/user-id/151377),

HubDB is a good use if you have the same content multiple times. Let’s take the events page for example. You usually have a list- (overview) and a detail page. On the overview you will see the event name, date, a short text (trimed), image and a button. On the detail page you want to give the user more information like: Event name, date, full text, image and maybe a form or a button.

You just need to update the HubDB and the listings and detail will be generated automatically.

Your cases/news/events are a perfect fit for a HubDB pages.

This could be a good reference ([Build dynamic pages using HubDB - HubSpot docs](https://developers.hubspot.com/docs/cms/guides/building-dynamic-pages-with-hubdb))

- Chris

---

<div class="post-metadata">

**Author:** ![Michiel\_Tob](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/michiel_tob/32/13631_2.png) [@Michiel\_Tob](https://community.hubspot.com/u/Michiel_Tob)\
**Post date:** [November 23, 2020, 2:13pm UTC](https://community.hubspot.com/t/when-to-use-hubdb/28325/5 "2020-11-23T14:13:30Z")

</div>

Thanks @Chris-M ,

I’ve just tried your solution and it works perfectly the way I wanted it.
