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

    I want to to show a column with 3 logos in it, that gets replaced in a certain amount of time, with other logos in a random order.
    All the images are in a directory, and they can be changed (add more pictures, remove some, etc..).

    Is there a snippet/chunk that does it?
    If not, how can I do it using prototype and maybe scriptacoulus?
    Is there a way in which the logos will be preloaded in a controlled method (so that not all of them will be loaded on the page load. I will have about 40-50 logos..)?


    I thank you a lot for helping out with all of my questions!
    I’m addicted to MODx! laugh
      • 15987
      • 786 Posts
      Here is a random image snippet:

      http://modxcms.com/forums/index.php/topic,3719.0.html

      that will load a new image everytime the apge is loaded.

      If you want it to change without page load yoiu could use prototype to d oan ajax request and change the image after a certain amount of time. I’m not sure anyone has created something like this for modx yet.

        • 7455
        • 2,204 Posts
        you could create 3 folders and use the random image snippet 3times each getting images from another folder.
        and you could yous a simple javascript that randomly places images with an interfall
          follow me on twitter: @dimmy01