We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!

Answered Slider

    • 41970
    • 79 Posts
    Hello,

    I am new to modX and this forum, and I hope that you can help me with something that might seem pretty basic for most of you.

    I am building a site that contains a content slider on the homepage, and I managed to set this up so far. I don't know how I can enable the user to add more "slider elements" while he is updating the content? Like an "add slider" button, where the same chunk I created (containing headline, subheadline, 2 small images and regular text) is added below. Then the user can update the second slider, and if necessary, add more sliders (chunks).

    How can I do this? Please help!

    Thank you in advance!
    Belinda

    This question has been answered by bblinda74. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It's much better to give the editor a form with fields for each element of the slider item.

      This can be done in several ways, depending on exactly what the slider is.

      I prefer to use a dedicated resource with its own template, and a MIGx TV. You can modify the dedicated resource with form customization to only display the TV grid. The resource itself is never shown on the site; it just acts as a convenient container for the slider TV.

      http://rtfm.modx.com/display/ADDON/MIGX
      https://www.markhamstra.com/modx-blog/2012/04/managing-galleries-with-migx/
      http://rtfm.modx.com/display/revolution20/Form+Customization+Sets
        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
      • discuss.answer
        • 41970
        • 79 Posts
        Thank you for your reply, I will have a look at this solution!

        In the meantime, I solved it myself, with getResources. Took me a while to figure it out (I am a designer, not a programmer), but now I got it.
        Here is the result so far (only placeholder content): http://smegd.com/modX/index.php?id=2



          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That is indeed another perfectly good way to do it. This is MODx; there are always several ways to accomplish something. I just happen to be very fond of MIGx.
            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
            • 41970
            • 79 Posts
            I wanted to use MIGx at first, but just didn't "get" into it, so I looked for something similar. I will definitely look into MIGx too.
              • 39333
              • 151 Posts
              MIGx is definitely one of the greatest add-ons for MODx and well worth taking the time to learn the JSON to implement it.

              You can modify the dedicated resource with form customization to only display the TV grid

              Never would have thought of isolating a Resource like that. Learn something new every time I read your posts Susan smiley
                MODX...the Zen of CMS
                "Bight off more than you can chew and keep right on chewing."