I am building a responsive web site which has a slider on it which has numerous settings based on the Revolution Slider 4.1.4
Each slide is made up of 1 or more layers which can define text or images. Each later has a DIV which configures the positioning, speed of animation etc.
The basic structure is:
<li> <!-- SLIDE 1 -->
<div> <!-- LAYER 1 -->
<div> <!-- LAYER 2 -->
<div> <!-- LAYER 3 -->
</li>
<li> <!-- SLIDE 2 -->
<div> <!-- LAYER 1 -->
<div> <!-- LAYER 2 -->
<div> <!-- LAYER 3 -->
</li>
Can MIGX be configured to output multiple slides each with multiple layers? Any pointers on how to do this would be helpful.
Kind regards
James
-
☆ A M B ☆
- 24,524 Posts
Yes, of course. Just make sure that the MIGx fields match the items needed for the slider, and create your getImageList's chunk tpl to match the HTML that the slider expects.
there are several options.
you can have another inner MIGX - TV inside an outer MIGX - TV
you can have a Resource for each slide and a MIGX in that resource for the layers
you could manage that Resources (the slides) with a MIGXdb-TV or with GridClassKey or Collections
I do not want to over complicate it... is a good option to create an inner MIGX for the layers and then an outer MIGX which defines the slide?
Would a single getImageList then transverse the lot? (probably need a field for to define the order and whether a slider is enabled / disabled)
you can have a checkbox-field for example named 'published' for the outer MIGX-TV and call the slides with
[[getImageList? &tvname=`slides` &tpl=`slidesTpl` &where=`{"published:=":"1"}`]]
then in the slides - chunk, if the inner MIGX-field has the name layers:
[[getImageList? &value=`[[+layers]]` &tpl=`layersTpl`]]
you don't need a field for the order.
you can reorder by drag/drop
ok, many thanks for the pointers. I will have a go
Apathy, were you able to get this sorted?
I'm here to help if you need it.
MODX Front End Dev