# Help creating a dropdown menu module

**URL:** <https://community.hubspot.com/t/help-creating-a-dropdown-menu-module/85871>\
**Category:** CMS Development\
**Created:** [July 21, 2023, 5:32pm UTC](https://community.hubspot.com/t/help-creating-a-dropdown-menu-module/85871 "2023-07-21T17:32:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amita](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amita/32/9140_2.png) [@Amita](https://community.hubspot.com/u/Amita)\
**Post date:** [July 21, 2023, 5:32pm UTC](https://community.hubspot.com/t/help-creating-a-dropdown-menu-module/85871/1 "2023-07-21T17:32:25Z")

</div>

Hi everyone!

I’m looking for a way to turn the “simple menu” module into a dropdown list instead of an actual page menu structure, but I’ve run into a roadblock. I’m probably doing something wrong (trial and error over here!) so any guidance would be much appreciated!

Here’s the code I’ve used to create my own module:

`<div class="version-changer"><p>Current as of <select id="version-dropdown">{% for node in module.menu_tree %}<option value="{{ node.menu-item.link }}">{% simple_menu menu_tree="{{ module.menu_tree }}" %}</option>{% endfor %}</select></p></div>`

And I’m just using the Simple Menu (label: menu\_tree) to do this.

However, when I test this out and add a few menu items for the dropdown to display, I run into issues.

If my options are:

- Blog (/blog)

- News (/news)

- Events (/events)

Then the dropdown menu produces this:

- Blog News Events

- Blog News Events

- Blog News Events

I’ve tried using ChatGPT to help me understand what I’m doing wrong, but when I use the suggestions that it gives me, all the text disappears from the dropdown and I just see 3 (or however many) blank options.

Any help would be amazingly appreciated! 🙏

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 25, 2023, 7:38pm UTC](https://community.hubspot.com/t/help-creating-a-dropdown-menu-module/85871/2 "2023-07-25T19:38:42Z")

</div>

Hey, @Amita 👋 Thanks for reaching out. Did you get this resolved? If not, it looks like you are using the `simple_menu` tag within a loop for each node in your `menu_tree`. I wonder if this is causing all the menu items to be rendered for each option in the dropdown.

Thanks! — Jaycee

---

<div class="post-metadata">

**Author:** ![Amita](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amita/32/9140_2.png) [@Amita](https://community.hubspot.com/u/Amita)\
**Post date:** [July 26, 2023, 12:26pm UTC](https://community.hubspot.com/t/help-creating-a-dropdown-menu-module/85871/3 "2023-07-26T12:26:50Z")

</div>

Hi [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)! Thanks for your reply! I have not found a solution to this so far… I tried tinkering with the code based on your insight and I couldn’t get a better result that the repeated menu items in each option. If I removed the simple\_menu tag from within the loop for each node, all the options went blank like this:

 ![Amita_0-1690374052018.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/e/ee16a71ad652aedf5c34e75806c0a409932d79a1.png)

The only way that I have managed to get the menu items to populate (albeit all of them every time) was to have simple\_menu included in each node… So I’m still stuck 🤪
