Posted by ludo1960 on December 20, 2011 at 1:51pm
Hello
Got as far as running a query grabbing a bunch of nids and passing them to a view, thought I was doing well! However you guessed it, the sort order is wrong, here's my pseudo code:
//query to grab the nids
if (!empty($nodeids)) {
$view='taxo_listing';
foreach ($nodeids as $nid){
print views_embed_view($view, block_1, $nid);
}
What I need to do is pre-build the view then run views_query_alter to sort the view before printing out the view.
Been looking at http://views.doc.logrus.com/ for a while now, but it's all a bit confusing, can anyone offer any clues as how to go about this? I know what I want to do but unsure how to go about it, sound familiar guys?
Thanks in advance.