We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10558
    • 23 Posts
    Originally developed for Etomite version 6.0 onwards but should work in MODX.

    I developed this snippet to call 9 different chunks of HTML code in random order.

    Save the snippet code as RandomTeasers, copy and amend the chunk coding as explained in the comments, and add the css coding to your main site css file.

    Usage [!RandomTeasers!] on a page. Refreshing a page generates the chunks in a different order.

    However the output could also generate a sidebar with random or  static chunks as follows.

    See http://www.ansteymethodist.org home page for a sidebar example. Here I have commented out the shuffle command, added a fourth chunk call to the left table, and commented out the middle and right tables to produce a static sidebar on the right of the home page.

    The attached file contains the snippet, chunk and css coding required.

    Hope this might be of interest. Let me know what you think, and whether you are able or need to use it on your site.

    Oh, and before anyone says my coding in inefficient - IT WORKS !
      Gordon.
      My Etomite web site http://www.gbtamc.co.uk/et
      My main web site http://www.gbtamc.co.uk
      My blog site http://www.gbtamc.co.uk/blog
      My photo gallery http://www.gbtamc.co.uk/spgm
      • 18397
      • 3,250 Posts
      Thanks for the snippet!
        • 7455
        • 2,204 Posts
        would it be posible to use document tv’s instead of chucks?

        I have a folder containing document with articles
        every article hase a quote from the article in a tv.

        on the homepage I have a div where I like to get a random quote with a link to the document the quote comes from.

        would that be posible or schould I seek somwhere els? (doe newslising support random doc?)

        Greets Dimmy
          follow me on twitter: @dimmy01
          • 32241
          • 1,495 Posts
          Quote from: Dimmy at Mar 03, 2006, 09:23 PM

          would it be posible to use document tv’s instead of chucks?

          I have a folder containing document with articles
          every article hase a quote from the article in a tv.

          on the homepage I have a div where I like to get a random quote with a link to the document the quote comes from.

          would that be posible or schould I seek somwhere els? (doe newslising support random doc?)

          Greets Dimmy

          That will be nice wink
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 7455
            • 2,204 Posts
            Got it worked out by adapting one of Jareds great snippets:

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

            Greets Dimmy
              follow me on twitter: @dimmy01
              • 10558
              • 23 Posts
              Just a little feadback please.

              This post read several hundred times and over 100 downloads.

              Is anyone using it on their site ?

              If so would appreciate details.
                Gordon.
                My Etomite web site http://www.gbtamc.co.uk/et
                My main web site http://www.gbtamc.co.uk
                My blog site http://www.gbtamc.co.uk/blog
                My photo gallery http://www.gbtamc.co.uk/spgm
                • 32241
                • 1,495 Posts
                Quote from: gbt at Apr 06, 2006, 03:16 PM

                Just a little feadback please.

                This post read several hundred times and over 100 downloads.

                Is anyone using it on their site ?

                If so would appreciate details.

                lol, that’s one of the problem when you create a stable snippet/resource. Usuall people won’t even bother giving a feedback, unless if they found something wrong with the scripts that you create. So if you see a lot of people downloading it and nobody ever complained about it, most of the times that your snippets works just fine wink

                It’s just my 2 cents though laugh
                  Wendy Novianto
                  [font=Verdana]PT DJAMOER Technology Media
                  [font=Verdana]Xituz Media