ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Templating Question

August 23, 2010 4:09pm

Subscribe [1]
  • #1 / Aug 23, 2010 4:09pm

    Sprocketeer

    37 posts

    OK, here’s one for an EE guru:

    I want to pull the 8 most recent items, randomly, from a weblog/channel. I can do either—the 8 most recent—or the other (random), but when I try both, it just pulls any 8 randomly from the entire pool of entries. I just want the 8 most recent, rearranged every time the page is loaded. Does that make sense? What would the {exp:weblog:entries} tag look like?

    Thanks in advance for any guidance.

  • #2 / Aug 23, 2010 4:16pm

    Ingmar

    29245 posts

    I am afraid there is no good built-in way to do just that: you can the last 8, you can get any random set of 8, but not the last 8 in random order. A custom SQL query or some PHP would be the way to go here.

  • #3 / Aug 24, 2010 1:22am

    Sprocketeer

    37 posts

    Thanks Ingmar. I wanted to avoid that so I found another solution that accomplishes the same thing.

  • #4 / Aug 24, 2010 2:25am

    Ingmar

    29245 posts

    Very glad to hear that. Please don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases