# Multiple node levels for a breadcrumb menu

**URL:** <https://community.hubspot.com/t/multiple-node-levels-for-a-breadcrumb-menu/93343>\
**Category:** CMS Development\
**Tags:** starter\
**Created:** [November 6, 2023, 10:43am UTC](https://community.hubspot.com/t/multiple-node-levels-for-a-breadcrumb-menu/93343 "2023-11-06T10:43:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VMNaude](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@VMNaude](https://community.hubspot.com/u/VMNaude)\
**Post date:** [November 6, 2023, 10:43am UTC](https://community.hubspot.com/t/multiple-node-levels-for-a-breadcrumb-menu/93343/1 "2023-11-06T10:43:14Z")

</div>

I am trying to add another level to the breadcrumb menu, but all it does is duplicate level 2. Below is the code I am using:

{% set menu\_id = module.renamed\_from\_id || module.menu %}  
{% set node = menu(menu\_id,“breadcrumb”) %}

{% if node != null %}  
\<ul class=“hs-breadcrumb-menu”\>

\<div class=“breadcrumb-container”\>  
{# Add the home page in #}  
{% if node.level \> ‘0’ %}  
\<li class=“hs-breadcrumb-menu-item first-crumb”\>  
\<a href=“/” class=“hs-breadcrumb-label”\>Home\</a\>  
\<span class=“hs-breadcrumb-menu-divider”\>\</span\>  
\</li\>  
{% endif %}

{# Add the level in between if it’s level 2 #}

{% if node.level \> ‘1’ %}  
\<li class=“hs-breadcrumb-menu-item first-crumb”\>  
\<a href=“{{node.parentNode.url}}” class=“hs-breadcrumb-label”\>{{node.parentNode.label}}\</a\>  
\<span class=“hs-breadcrumb-menu-divider”\>\</span\>  
\</li\>  
{% endif %}  
{# Add the level in between if it’s level 3 #}

{% if node.level \> ‘2’ %}  
\<li class=“hs-breadcrumb-menu-item first-crumb”\>  
\<a href=“{{node.parentNode.url}}” class=“hs-breadcrumb-label”\>{{node.parentNode.label}}\</a\>  
\<span class=“hs-breadcrumb-menu-divider”\>\</span\>  
\</li\>  
{% endif %}

{# ADD the CURRENT PAGE #}

\<li class=“hs-breadcrumb-menu-item last-crumb”\>  
\<span class=“hs-breadcrumb-label”\>{{node.label}}\</span\>  
\</li\>  
\</div\>

\</ul\>  
{% endif %}  
Below is the output:

 ![VMNaude_0-1699267286116.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/7/f737108e1c5327d7e83d3782ba075d59d549dc67.png)

Below is the nav structure:

 ![VMNaude_1-1699267352529.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/6/66dd4828d97dd944df757093a2117c25257095ac.png)

Kindly assist if possible?

---

<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:** [November 7, 2023, 6:43pm UTC](https://community.hubspot.com/t/multiple-node-levels-for-a-breadcrumb-menu/93343/2 "2023-11-07T18:43:38Z")

</div>

Hi, there! I have a question to help the community better understand your issue.

Question – does your node object have a parent node property of its own? It looks like you may need to adjust your code to reference `node.parentNode.parentNode` to access the “grandparent” node of the current node.

It’s hard to be certain without knowing how your menu function is set up.

Thank you for the additional information! — Jaycee
