Skip to content

Instantly share code, notes, and snippets.

@sashabeep
Created August 14, 2023 11:57
Show Gist options
  • Save sashabeep/f1391fc01d76caa4e8fd2f75560c42b1 to your computer and use it in GitHub Desktop.
Save sashabeep/f1391fc01d76caa4e8fd2f75560c42b1 to your computer and use it in GitHub Desktop.
evolution cms basic bootstrap menu
{!! $modx->runSnippet('DLMenu',[
'parents' => 0,
'maxDepth' => 2,
'outerClass'=> 'navbar-nav mainmenu',
'rowClass'=>'nav-item',
'currentClass'=>'active',
'hereClass'=>'active',
'rowTpl'=>'@CODE: <li [+classes+]><a class="nav-link" href="[+url+]" [+link_attributes+]>[+title+]</a></li>',
'parentRowTpl'=>'@CODE: <li [+classes+]> <a class="nav-link dropdown-toggle" href="[+url+]" [+link_attributes+] data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">[+title+]</a>[+wrap+]</li>',
'innerClass'=>'dropdown-menu',
'innerTpl'=>'@CODE: <ul [+classes+]>[+wrap+]</ul>',
'innerRowTpl'=>'@CODE: <li [+classes+]><a class="nav-link text-primary" href="[+url+]" [+link_attributes+]>[+title+]</a></li>',
'parentClass'=>'dropdown'
],0) !!}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment