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.

Channel entry with random orderby

October 22, 2010 8:10pm

Subscribe [3]
  • #1 / Oct 22, 2010 8:10pm

    Raistlin

    6 posts

    Hi,

    I’ve got this area of my clients homepage that has channel entries randomized with a jQuery scroller.  It all works fine, but I’ve now been asked to always have the first entry be X, and then everything randomized afterwards.  Is something like this possible ?

    Thanks.

  • #2 / Oct 22, 2010 9:35pm

    Mark Bowen

    12637 posts

    Hiya,

    If I’m understanding correctly then perhaps you could use two weblog / channel tags here? One for the first entry and then one for the random entries.

    That or perhaps something using a Matrix field where you choose the entries via relationships and in the weblog / channel tag you pull out the first row of data for your X entry and then everything else after you randomise them?

    Don’t know if that would help at all?

    Best wishes,

    Mark

  • #3 / Oct 22, 2010 10:59pm

    Raistlin

    6 posts

    Hi Mark,

    Thanks for the quick reply.  You’ve given me an idea to just create a category for that special entry, and then do the rest randomized.  I’ll give that a shot.

    Thanks much.

  • #4 / Oct 23, 2010 6:12am

    Mark Bowen

    12637 posts

    Hiya,

    Hi Mark,

    Thanks for the quick reply.  You’ve given me an idea to just create a category for that special entry, and then do the rest randomized.  I’ll give that a shot.

    Thanks much.

    No problem at all. Yep a category could do it too or perhaps a custom status instead. Many ways of attacking the same thing in ExpressionEngine which is why it’s just so great to work with 😊

    Hope it all goes well for you.

    Best wishes,

    Mark

  • #5 / Oct 25, 2010 11:12pm

    Duncan McCall

    46 posts

    Maybe I’m missing what you’re after, but if it’s the same entry you want to be first each time, can’t you just hard code the first entry: {exp:channel:entries entry_id="XX" ...} then have another channel entry tag to populate the other items.

  • #6 / Oct 26, 2010 1:52pm

    Raistlin

    6 posts

    Thats exactly what I ended up doing.  It was too simple, actually!

    I feel like a knob for even asking…

    Thanks.

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

ExpressionEngine News!

#eecms, #events, #releases