We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1887
    • 50 Posts
    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
      • 28042 ☆ 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.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 4172
        • 5,888 Posts
        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

          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 1887
          • 50 Posts
          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)

            • 4172
            • 5,888 Posts
            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
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 1887
              • 50 Posts
              ok, many thanks for the pointers. I will have a go
                • 47838
                • 6 Posts
                Apathy, were you able to get this sorted?

                I'm here to help if you need it.
                  MODX Front End Dev