Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Views Data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Nov 2009 at 14:19 UTC
Updated:
6 Nov 2009 at 20:59 UTC
We have created a relatively simply view that takes as its third argument a series of node IDs separated by one of the suggested delimiters ("," or "+"). Everything seems to work fine in that the view returns the requested fields for each of the node IDs included in the argument. However, we have noticed that the order of the node IDs is not necessarily honored. For instance:
print views_embed_view('Slideshow', 'block', 1,2,3,4,5);
The above call returns all requested fields for each node ID, however they are not returned in order; they might be returned as 1,2,5,4,3.
Has anyone else encountered this issue; or has anyone got any pointers as to where we might have gone wrong?
Thanks.
Comments
Comment #1
dawehnerDo you have enabled any sort criteria? This would cause the nids to be returned in another order
Comment #2
reinholdlange commenteddereine - Thank you for replying. I have no sort criteria defined.
Comment #3
merlinofchaos commentedAll sorting is done by database order, not by the order you enter the arguments. This has been discussed extensively in the past.
Comment #4
reinholdlange commentedmerlinofchaos - understood - thank you for taking the time to reply.
Comment #5
merlinofchaos commentedFYI: The nodequeue module is excellent for sorting nodes in arbitrary order (and provides a nice UI for setting it up so you don't need to code a group of nids).