0

Is it possible to ignore the ORDERBY/SORT parameters in an exp:channel:entry tag and display the entries as given in a list of IDs?

I have a embedded template where I pass down a list of entry IDs to render out. I would like to output the entries in the order they are passed down as entry_ids. Is this possible?

Here's my current loop:

{exp:channel:entries channel="events" entry_id="{embed:ids}" sort="asc"  orderby="status" limit="5"}

Where {embed:ids} is the list of entries I would like displayed, in the order I would like. I.e. 5|1|3|7. But there is no parameter which will not re-arrange the output order (by date, author, etc..).

Do I need to use the query module to achieve what I want here? It seems EE will try to arrange by date whenever possible.

For full clarity's sake. This is part of a ChannelForm Newsletter creator that selects events and then submits a list of entries as bar | separated entry_is into a input for a given issue. This is then renderd into an email template to be used later.

2

Sounds to me that the fixed_order parameter is exactly what you are looking for.

Related: Expression Engine Entries Loop in Reverse

2

You can use the fixed_order="{embed:ids}" parameter.

Documentation can be found here.

0

Just FYI, if you give the channel:entries tag 'entry_id' parameter, without the order parameters, the output will be in the order specified in entry_id parameter. Just like the fixed_order parameter, which is the correct answer above. See comments below, my bad, living in the past!

  • Actually, no. Then the default order will be applied, which is descending by entry date. – Low Apr 7 '15 at 11:05
  • Hi Low, (excuse the pun!), Perhaps I'm thinking of older version of EE then (prior to fixed_order parameter) as I've definatly used the entry_id in order trick/hack/thing on older sites! Appologies that I mislead, I look at mod.channel.php now (v2.8.1) and can see that yes it will apply entry_date ordering by default now. – Blatant Apr 7 '15 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.