We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31191
    • 39 Posts
    I am using Scrollable (http://flowplayer.org/tools/scrollable/index.html#plugins) to scroll through a ’Latest Posts’ section on a site in dev. Link to static HTML-->http://ismk.org/v3static/section.html The static content (before using getResources) to display the content works and is in the format:

    <div class="items">
      <div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
      </div>
      <div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
      </div>
    </div>


    The jQuery Scrollable, only allows 3 items at a time to scroll. I think it used to allow you to set the amount in each scrolling section, but not anymore. When I setup a chunk to output the 6 latest resources, the html output looks like this:

    <div class="items">
      <div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
        <div class="item">Post Content</div>
      </div>
    </div>


    Any suggestions on what I can to force the group of 3 divs so jQuery scrollabe stuff will work. Do I need a nested loop to grab 3 and then grab the next 3?

    Here’s a link to the static content - http://ismk.org/v3static/section.html(the page using the getResources is still in dev and locked down in MODx.) I’m using Revolution 2.0.7. You can see on the link above, the Latest News and Upcoming Events, both use this setup.
      perusing forums is where my comp sci degree got me.
      • 9995
      • 1,613 Posts
      Hmm, i do know how to do this when using TV's, for resources i dunno.
      maybe this gives any idea:

      [ [*newsitem3:is=``:then=``:else=`</div><div>` ]] [ed. note: fourroses666 last edited this post 13 years, 11 months ago.]
        Evolution user, I like the back-end speed and simplicity smiley
        • 4172
        • 5,888 Posts
        you can try this:
        [[!If? 
        &subject=`[[+idx:math=`?%3`]]`
        &operand=`0`
        &operator=`EQ`
        &then=`</div><div>`
        ]]
        

          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 31191
          • 39 Posts
          I ended up using the tplFirst, tplLast and tpl_{n} options to add the divs in the correct places. These other options are worth a shot too on a future project.

          Thanks for the replies!
            perusing forums is where my comp sci degree got me.
            • 36803
            • 6 Posts
            I used the If addOn Bruno suggested.
            I used the modulus 3 to add the necessary styling to every 3rd element retrieved by getResources. Worked perfectly. Thanks

            Quote from: Bruno17 at Apr 26, 2011, 07:58 AM
            you can try this:
            [[!If? 
            &subject=`[[+idx:math=`?%3`]]`
            &operand=`0`
            &operator=`EQ`
            &then=`</div><div>`
            ]]