# pdoMenu - Using different

**URL:** <https://community.modx.com/t/pdomenu-using-different/5528>\
**Category:** Support\
**Tags:** pdotools\
**Created:** [July 1, 2022, 2:49pm UTC](https://community.modx.com/t/pdomenu-using-different/5528 "2022-07-01T14:49:46Z")\
**Posts on this page:** 1\
**Showing post:** 36

<div class="post-metadata">

**Author:** ![coconghaile](https://community.modx.com/user_avatar/community.modx.com/coconghaile/32/136_2.png) [@coconghaile](https://community.modx.com/u/coconghaile)\
**Post date:** [August 24, 2022, 10:54am UTC](https://community.modx.com/t/pdomenu-using-different/5528/36 "2022-08-24T10:54:39Z")

</div>

I forgot to reply earlier saying that this works an absolute treat now. Thanks a million for all your help guys. I really appreciate it. I’ll add the code that works for me.

Here’s the pdoMenu call

```auto
<nav class="primary-menu">
  <ul class="menu-container">
    [[pdoMenu?
      &parents=`0`
      &level=`0`
      &tplOuter=`@INLINE {{+wrapper}}`
      &tpl=`navTpl`
    ]]
  </ul>
</nav>

```

Here’s the navTpl call

```auto
{set $parent_ids = $_modx->getParentIds($id)}
{if 8 in $parent_ids}
    {if $level == 1}
        <li class="menu-item mega-menu"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <div class="mega-menu-content mega-menu-style-2"><div class="container"><ul class="row list-unstyled">{$wrapper}</ul></div></div>
        {/if}
        </li>
    {elseif $level == 2}
        <li class="menu-item mega-menu-title mt-0 col-lg-3 mega-menu-column"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <ul class="sub-menu-container">{$wrapper}</ul>
        {/if}
        </li>
    {elseif $level == 3}
        <li class="menu-item"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <ul class="sub-menu-container mega-menu-dropdown">{$wrapper}</ul>
        {/if}
        </li>
    {else}
        <li class="menu-item"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <ul class="sub-menu-container mega-menu-dropdown">{$wrapper}</ul>
        {/if}
        </li>
    {/if}
{elseif $id == 8}
    <li class="menu-item mega-menu"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
    {if $wrapper?}
        <div class="mega-menu-content mega-menu-style-2"><div class="container"><ul class="row list-unstyled">{$wrapper}</ul></div></div>
    {/if}
    </li>
{else}
    {if $level == 1}
        <li class="menu-item"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <ul class="sub-menu-container">{$wrapper}</ul>
        {/if}
        </li>
    {elseif $level == 2}
        <li class="menu-item"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <ul class="sub-menu-container">{$wrapper}</ul>
        {/if}
        </li>
    {else}
        <li class="menu-item"><a class="menu-link" href="{$link}" {$attributes}>{$menutitle}</a>
        {if $wrapper?}
            <ul class="sub-menu-container">{$wrapper}</ul>
        {/if}
        </li>
    {/if}
{/if}

```

Like I said…this works perfectly for me.

NB: Would anyone know how to add a CURRENT class. So when you are on the current page, it’d add the current class to the class tags.

---

_[View the full topic](https://community.modx.com/t/pdomenu-using-different/5528)._
