Load Preceding Nodes in a View Block Sorted by Date in Relation to the Current Node Currently I have a basic View block just showing a bunch of articles in a teaser format. I added this view block to show up below the content of each article page. What I want is to be able to show the preceding articles in relation to the node you are currently viewing by the next future date.

The only extra thing in this view is that I added in contextual filters for NID. I am passing in multiple values into this view block, so YES i do have it "multiple values" checked off.

But I'm not sure why its not working. Technically it should be as it is in fact returning a string of NID's as outputted below:

if (arg(0) == 'node') {
  $node = menu_get_object();
}
$curNode = $node-&gt;nid;
$curNodeDate = $node-&gt;created;

dsm($node);

$type = "article"; 
$nodes = node_load_multiple(array(), array('type' =&gt; $type)); 

dsm($nodes);

$finalNid = array();

foreach($nodes as $products):
  if( intval($products-&gt;created) &gt; intval($curNodeDate)  ){
dsm($products-&gt;created .'&gt;'. $curNodeDate .'---'. $products-&gt;nid .'~~'. $products-&gt;title );
    $finalNid[] = $products-&gt;nid;
  }
endforeach;

foreach($nodes as $products):
  if( intval($products-&gt;created) &lt; intval($curNodeDate)  ){
dsm($products-&gt;created .'&lt;'. $curNodeDate .'---'. $products-&gt;nid .'~~'. $products-&gt;title );
    $finalNid[] = $products-&gt;nid;
  }
endforeach;

dsm(implode("," , $finalNid));

return implode("," , $finalNid);




When running that code I get the following dsm output:

1416508384&gt;1416508382---65~~Rimmel's Georgia May Jagger &amp; COTY partner with DBC
1416508383&gt;1416508382---66~~Daisy Marc Jacobs Tweetshop Grabs the Attention of the Industry
1416508390&gt;1416508382---68~~COTY's Mario Reis
1416508386&gt;1416508382---71~~Beauty Trends for this Holiday Season
1416508385&gt;1416508382---72~~COTY’s Catherine Walsh Honored
1416508388&gt;1416508382---74~~ONE COTY - Looking at COTY as a Whole
1416508387&gt;1416508382---75~~Roberto Cavalli
1416508389&gt;1416508382---80~~A modern story of seduction
1416764226&gt;1416508382---86~~Sir Ken Robinson
1416810455&gt;1416508382---87~~COTY’s Svetlana Omelchenko makes the 2014 Top 100 OUTstanding LGBT Business Leaders List
1413318695&lt;1416508382---2~~philosophy bringing hope &amp; grace to mental health efforts
1413318711&lt;1416508382---3~~Q&amp;A with Ann Gottlieb
1413402303&lt;1416508382---6~~Meet COTY CMO of Skincare
1416508381&lt;1416508382---67~~Spotlight On Leadership: David Booth
1415666899&lt;1416508382---73~~Creative Collaborations: COTY and Avon
65,66,68,71,72,74,75,80,86,87,2,3,6,67,73
&lt;?php

$curnode = menu_get_object();
if (!$curnode) return '';

$query = new EntityFieldQuery();

$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'article')
  -&gt;propertyCondition('created', $curnode-&gt;created, '&lt;=')
  -&gt;propertyOrderBy('created', 'DESC')
  -&gt;range(0, 10); //CHANGE RANGE FOR YOUR LIMITS

$result = $query-&gt;execute();

$items = array();
if (isset($result['node'])) {
  $nodes_nids = array_keys($result['node']);
  $nodes = entity_load('node', $nodes_nids);
  foreach ($nodes as $node) {
    $items[] = l($node-&gt;title, 'node/' . $node-&gt;nid);
  }
}

return theme('item_list', array('items' =&gt; $items));

?&gt;