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

    I searched the forum but with no results.
    Is there a content rotator, which will display some content (it can be a webpage from specified modx folder),
    + in the specified frequency for exaple each content is displayed 1 hour, or 2 days,
    + and specified order (ie webpage#1 is displayed first, then webpage#2, then webpage #3 and webpage#4) ?
    + or each webpage has its own priority, ie webpage#1 is displayed 2 times more often the webpage#4, which is displayed 2 times more often then #2

    I imagine the rotator to work with the following algorithm:

    if (random==true){
    display content#random for X unique-pagevisits; // or easier: page-views
    }
    else{
       while(1==1){
       display content#y1 for x1 days;
       display content#y2 for x2 days;
       display content#y3 for x3 days;
       }
    }

    And in html it would look like that
    <div id="rotator">
    // here is displayed the content of the page, it could be text, flash, img or whatever
    // [hardcore version] this div can be placed in more then 1 place on the webpage, and can be placed in integrated SMF forum
    </div>


    What snippets/modules/TVs could be usefull to create such rotator?
    Or maybe there is some Modx Snippet which enables this feature?
      modx is amazing and brilliant. So is modx community!
      • 27376
      • 576 Posts
      This would make a great Ditto extender. Your question might be better answered over there, document aggregation is Ditto’s specialty wink

      All I can say is it would be [em]more[/em] difficult to implement a relative time display, such as showing a page for two hours as opposed to an absolute time display, like show this page at 10:00 and then show another page at 12:00.
        • 33372
        • 1,611 Posts
        I randomize content all the time using simple custom snippets made to do whatever I need in that particular situation. But sirlancelot is right that this would be a nice thing to have as a Ditto extender. You can also write a very simple snippet to display the published document with the lowest menu index in a folder and then just use the publish/unpublish system to program them time-wise.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options