S
S
Sergey Balashov2016-10-28 03:03:26
MODX
Sergey Balashov, 2016-10-28 03:03:26

MODX: How to implement Wayfinder for Bootstrap 4 submenus?

The difference from Bootstrap 3 is that now the nested menu design is not

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
  <ul class="dropdown-menu">
    <li><a href="#">Subitem1</a></li>
    <li><a href="#">Subitem2</a></li>
  </ul>
</li>

a
<li class="nav-item dropdown">
  <a class="nav-link dropdown-toggle" href="http://example.com" id="supportedContentDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
  <div class="dropdown-menu" aria-labelledby="supportedContentDropdown">
    <a class="dropdown-item" href="#">Subitem1</a>
    <a class="dropdown-item" href="#">Subitem2</a>
  </div>
</li>

Those. div>a is now used instead of ul>li .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zooks, 2016-10-28
@zooks

I recommend pdoMenu from pdoTools instead of Wayfinder - you can set elements there without creating extra chunks.
https://docs.modx.pro/components/pdotools/snippets...
See the Template Options section to replace inner menu item wrappers with divs.

G
Gregory, 2016-10-28
@gregst

evo?
innerTpl:
innerRowTpl

<a class="dropdown-item" href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question