S
S
San0072019-09-04 12:33:25
MODX
San007, 2019-09-04 12:33:25

How to display carousel items through additional fields in ModX Revo?

Good afternoon.
There are 5 pages in ModX. An Owl Carousel is used at the end of each page.
On each page, a different number of elements (slides) of the carousel.
In the template of these pages:

<div class="more">
        
</div>

In the chunk itself:
<div class="owl-carousel owl-theme">
    
 </div>

Elements (slides) look like this:
<article class="item">
  <a href="#" class="image fit">
    <img src="/images/1281-back.jpg" alt="bg" />
    <div class="owl-lazy logo" data-src="/images/logo/1281-front.png"></div>
  </a>
</article>

On the first page, you need to display 5 slides, on the second 8, on the third 4. The
question is how to display them correctly through additional fields so as not to duplicate the HTML markup of each element (slide) on all pages?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
San007, 2019-09-04
@San007

Created 8 chunks, each with its own markup:

<article class="item">
  <a href="#" class="image fit">
    <img src="/images/1281-back.jpg" alt="bg" />
    <div class="owl-lazy logo" data-src="/images/logo/1281-front.png"></div>
  </a>
</article>

In the additional fields, I chose "List (Multiple Choice)".
In the values ​​indicated:
In the settings of the page itself, I selected the slides I needed.

A
Anton Tarasov, 2019-09-04
@an-tar

MIGX is convenient for sliders , create such an additional field for each of the five pages and link the necessary images. Then display on the page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question