We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3633
    • 84 Posts
    My client has requested to have an image cycle on his website. I need the image cycling to use ajax and not anything do with flash, he doesn’t want anything fancy, just a simple and easy to use image cycling module, to change the images from one image to another image. So can someone please tell me, where I can get an image cycle module for modx? Thanks in advance.
      • 4385
      • 372 Posts
      You really don’t need a snippet to do image cycling. You are on the right track with ajax, just generate some good clean html.

      	<div class="slideshow">
      		<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />
      		<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />
      		<img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />
      		<img src="http://cloud.github.com/downloads/malsup/cycle/beach4.jpg" width="200" height="200" />
      		<img src="http://cloud.github.com/downloads/malsup/cycle/beach5.jpg" width="200" height="200" />
      	</div>
      


      And add some jQuery and the jQuery Cycle Plugin. http://jquery.malsup.com/cycle/
        DropboxUploader -- Upload files to a Dropbox account.
        DIG -- Dynamic Image Generator
        gus -- Google URL Shortener
        makeQR -- Uses google chart api to make QR codes.
        MODxTweeter -- Update your twitter status on publish.
        • 3633
        • 84 Posts
        Thanks, bwente, but my client would like to change the photos when he likes via modx.
          • 4385
          • 372 Posts
          That’s what I thought too. You could do it a couple of ways. Is the same amount of photos? Do you want images for each resource/document?

          You could use Ditto, TinyMCE, Template Variables, etc...
            DropboxUploader -- Upload files to a Dropbox account.
            DIG -- Dynamic Image Generator
            gus -- Google URL Shortener
            makeQR -- Uses google chart api to make QR codes.
            MODxTweeter -- Update your twitter status on publish.
            • 3633
            • 84 Posts
            The image cycle will not be on every page, only certain amount of pages, and every image cycle will have different photos. I will look into using Ditto, TinyMCE, Template Variables, etc. If someone could please reply to this thread, with help on using Ditto, TinyMCE, Template Variables, etc for image cycling, please do?
              • 4385
              • 372 Posts
              Create a new template for the pages that you want the images cycling to be on. Make sure to include the jQuery link and plugin.
              Assign 5 template variables with input type "Image", call them photo1, photo2, etc...
              Assign the those TV’s to the new image cycling template.

              Use this in your template

              	<div class="slideshow">
              		<img src="[*photo1*]" width="200" height="200" />
              		<img src="[*photo2*]" width="200" height="200" />
              		<img src="[*photo3*]" width="200" height="200" />
              		<img src="[*photo4*]" width="200" height="200" />
              		<img src="[*photo5*]" width="200" height="200" />
              	</div>
              
                DropboxUploader -- Upload files to a Dropbox account.
                DIG -- Dynamic Image Generator
                gus -- Google URL Shortener
                makeQR -- Uses google chart api to make QR codes.
                MODxTweeter -- Update your twitter status on publish.
                • 3633
                • 84 Posts
                Wonderful, I will try that out. Thanks bwente.