# Create a menu automatically from HubDB?

**URL:** <https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [December 12, 2020, 5:24pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102 "2020-12-12T17:24:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![khookguy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/khookguy/32/82803_2.png) [@khookguy](https://community.hubspot.com/u/khookguy)\
**Post date:** [December 12, 2020, 5:24pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/1 "2020-12-12T17:24:17Z")

</div>

I want to create a menu using the dynamic pages defined in a HubDB table. So, when I add a new row to the table, the corresponding page automatically gets added to the menu.

Is this possible? If so how?

Thanks!

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [December 13, 2020, 3:31pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/2 "2020-12-13T15:31:08Z")

</div>

Hi @khookguy,

yes, this is possible and quite easy.

First create a (new) HubDB table and create at least two columns. One for the name and the second for the URL/Link.

Create a new module and write your layout. The most easiest one(a list) would be

```lia-code-sample
{% set hubdb = hubdb_table_rows(*HubDB-ID*) %}
<ul>
{% for item in hubdb %}
<li><a href="{{item.url}}">{{item.name}}</a></li>
{% endfor %}
</ul>

```

you should add CSS classes to style the menu

best,

Anton

---

<div class="post-metadata">

**Author:** ![khookguy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/khookguy/32/82803_2.png) [@khookguy](https://community.hubspot.com/u/khookguy)\
**Post date:** [December 13, 2020, 3:51pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/3 "2020-12-13T15:51:45Z")

</div>

Thanks Anton, but what I want to do is create/update an actual HubSpot [navigation menu](https://developers.hubspot.com/docs/cms/building-blocks/menus-and-navigation). Not just a list that I style with some CSS.

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [December 15, 2020, 12:04pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/4 "2020-12-15T12:04:05Z")

</div>

@khookguy if you want to connect a HubDB table directly to a HubSpot Navigation menu you will need to use the APIs for both of those and your own server that would handle the logic and handle the http requests between the two each time the table is published. It’s possible but it’s definitely a bit of work.

---

<div class="post-metadata">

**Author:** ![khookguy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/khookguy/32/82803_2.png) [@khookguy](https://community.hubspot.com/u/khookguy)\
**Post date:** [December 21, 2020, 5:23pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/5 "2020-12-21T17:23:05Z")

</div>

Hi Stefen,

Thanks for your response. It makes sense, but I’m not able to find any HubSpot API for navigation menus, either here: [2026-03 API reference - HubSpot docs](https://legacydocs.hubspot.com/docs/overview) or in the new apis: [2026-03 API reference - HubSpot docs](https://developers.hubspot.com/docs/api/overview)

Is it possible to manage navigation menus with the API?

Mark

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [December 21, 2020, 5:27pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/6 "2020-12-21T17:27:41Z")

</div>

@khookguy ah, I’m not seeing it either now that you mention it. I figured it would have been accessible via one of the CMS APIs but doesn’t look like it actually is.

---

<div class="post-metadata">

**Author:** ![khookguy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/khookguy/32/82803_2.png) [@khookguy](https://community.hubspot.com/u/khookguy)\
**Post date:** [December 21, 2020, 8:43pm UTC](https://community.hubspot.com/t/create-a-menu-automatically-from-hubdb/29102/7 "2020-12-21T20:43:31Z")

</div>

OK. So, it seems like this cannot be automated through the APIs at this time. For now, it seems like to do this, I’d need to forgo the HubSpot navigational menus and build a custom module. Thanks for your help.
