# HubL for custom menu?

**URL:** <https://community.hubspot.com/t/hubl-for-custom-menu/9259>\
**Category:** CMS Development\
**Created:** [June 26, 2018, 3:39pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259 "2018-06-26T15:39:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![evanshunt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evanshunt/32/27089_2.png) [@evanshunt](https://community.hubspot.com/u/evanshunt)\
**Post date:** [June 26, 2018, 3:39pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/1 "2018-06-26T15:39:18Z")

</div>

Hi all,

I have created a static version of my header, main navigation and footer. I have implemented those into my template and all looks good. I now want to make the menu more dynamic so the client can update labels and URLs for those - is there a way using HubL to add dynamic menu values within my header and footer markup?

Thanks!

Colin

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [June 26, 2018, 3:48pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/2 "2018-06-26T15:48:37Z")

</div>

Absolutely, go to:

**Settings (gear icon top right) → Marketing → Web Pages → Advanced menus**

They can build out the menu there.

And, in your template, replace your menu with the [HUBL markup for menus](https://developers.hubspot.com/docs/cms/hubl/tags)

`{% menu "my_menu" id=456, site_map_name='Default', overrideable=False, root_type='site_root', flyouts='true', max_levels='2', flow='horizontal', label='Advanced Menu' %}`

* * *

[tim@belch.io](mailto:tim@belch.io)

---

<div class="post-metadata">

**Author:** ![evanshunt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evanshunt/32/27089_2.png) [@evanshunt](https://community.hubspot.com/u/evanshunt)\
**Post date:** [June 26, 2018, 3:49pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/3 "2018-06-26T15:49:53Z")

</div>

Thanks I will try this!

---

<div class="post-metadata">

**Author:** ![evanshunt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evanshunt/32/27089_2.png) [@evanshunt](https://community.hubspot.com/u/evanshunt)\
**Post date:** [June 26, 2018, 4:15pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/4 "2018-06-26T16:15:23Z")

</div>

@tjoycedo you know if it’s possible to take some HubL conditions and just get the individual labels and urls from each? I don’t want all the generated markup as I’ve already have a working menu and would rather not have to rework my CSS to fit this. Something like (psuedo):

```auto
{% if menu == "the menu I want label" %}
{% for item in menu %}
 <li><a href="{{ item.url }}">{{item.text}}</a></li>
 {% endfor %}

```

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [June 26, 2018, 4:46pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/5 "2018-06-26T16:46:25Z")

</div>

@evanshunt - Unfortunately, no. You won’t be able to do that unless you put a bunch more work into creating a server page, using the hubspot api, then pulling the menu items in dynamically with javascript.

* * *

[tim@belch.io](mailto:tim@belch.io)

---

<div class="post-metadata">

**Author:** ![evanshunt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evanshunt/32/27089_2.png) [@evanshunt](https://community.hubspot.com/u/evanshunt)\
**Post date:** [June 26, 2018, 4:48pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/6 "2018-06-26T16:48:47Z")

</div>

Thanks very much. Is there any documentation on that?

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [June 26, 2018, 4:58pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/7 "2018-06-26T16:58:46Z")

</div>

No, they don’t have docs on that, and they don’t even have docs on the advanced menu api endpoint. Sorry for all the bad news. If there’s anything we (the community) can do to help you migrate your css to use the hubspot classes, let us know.

* * *

[tim@belch.io](mailto:tim@belch.io)

---

<div class="post-metadata">

**Author:** ![evanshunt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evanshunt/32/27089_2.png) [@evanshunt](https://community.hubspot.com/u/evanshunt)\
**Post date:** [June 26, 2018, 5:08pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/8 "2018-06-26T17:08:09Z")

</div>

Ah okay, thank you again for the support, really appreciate the feedback!

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [June 26, 2018, 5:11pm UTC](https://community.hubspot.com/t/hubl-for-custom-menu/9259/9 "2018-06-26T17:11:18Z")

</div>

No problem @evanshunt

If you found it helpful, please mark as solved 😄

* * *

[tim@belch.io](mailto:tim@belch.io)
