[[+content_image]]
R
R
RushV2020-10-26 07:20:59
MODX
RushV, 2020-10-26 07:20:59

How to make BS4 dropdown clickable?

I welcome everyone!
How to make dropdown menu item clickable?
Usually, when you click, the menu falls out, but how to make this item clickable.

[[pdoMenu?
                  &parents=`7`
                  &level=`2`
                  &outerClass=`nav justify-content-end text-uppercase menu-top`
                  &tpl=`@INLINE <li[[+classes]]><a class="nav-link text-dark" href="[[+link]]" [[+attributes]] title="[[+menutitle]]">[[+menutitle]]</a>[[+wrapper]]</li>`
                  &rowClass=`nav-item text-uppercase`
                  &parentClass=`dropdown`
                  &tplParentRow=`@INLINE <li[[+classes]]><a href="[[+link]]" [[+attributes]] class="nav-link dropdown-toggle text-dark" data-toggle="dropdown">[[+menutitle]]</a><ul class="dropdown-menu">[[+wrapper]]</ul></li>`
                  &tplInner=`@INLINE [[+wrapper]]`
                  ]]

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
Alexey Golyagin, 2020-10-26
@webrevenue

Like this

[[pdoMenu?
                  &parents=`7`
                  &level=`2`
                  &outerClass=`nav justify-content-end text-uppercase menu-top`
                  &tpl=`@INLINE <li[[+classes]]><a class="nav-link text-dark" href="[[+link]]" [[+attributes]] title="[[+menutitle]]">[[+menutitle]]</a>[[+wrapper]]</li>`
                  &rowClass=`nav-item text-uppercase`
                  &parentClass=`dropdown`
                  &tplParentRow=`@INLINE <li[[+classes]]><a href="[[+link]]" [[+attributes]] class="nav-link dropdown-toggle text-dark">[[+menutitle]]</a><ul class="dropdown-menu">[[+wrapper]]</ul></li>`
                  &tplInner=`@INLINE [[+wrapper]]`
                  ]]
in general the attribute data-toggle="dropdown"is not needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question