`Why is the active class not assigned?
K
K
Kalwin UA2021-10-20 18:31:06
MODX
Kalwin UA, 2021-10-20 18:31:06

Why is the active class not assigned?

Hello, I need a hint, I need to display the active class in the slider, I do it through pdoMenu.
My version:

[[pdoMenu?
 &parents=`365`
 &depth=`1`
 &tplOuter=`@INLINE <div class="carousel-inner">[[+wrapper]]</div>`
 &tpl=`tpl.upSliderChunk`
 &includeTVs=`slider-image`
]]

tpl.upSliderChunk
<div class="carousel-item [[+classnames]]">
    <img src="" class="d-block w-100" alt="[[+pagetitle]]">
    <div class="carousel-caption d-none d-md-block">
        <h5>[[+pagetitle]]</h5>
        <p>[[+longtitle]]</p>
    </div>
</div>

In this case, the slider is not shown, since the active class is not displayed, the first first and the last first are displayed instead. I can't figure out why.

There is a handicraft option to add &firstClass=`active`, but I wonder how to do it without it.

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
S
Sanes, 2021-10-20
@Sanes

&hereClass
For slider it is better to use BannerY or pdoResources

A
Alexander Vasiliev, 2021-10-25
@amvasiljev

even easier to use for MIGX slider

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question