<div>You may consider views_get_view_result()</div><div><br></div><div>A bit of a tangent, but the Panels module is great at solving use cases such as these <a href="http://drupal.org/project/panels">http://drupal.org/project/panels</a></div>

<br><br><div class="gmail_quote">On Thu, Apr 14, 2011 at 10:56 PM, Shai Gluskin <span dir="ltr">&lt;<a href="mailto:shai@content2zero.com">shai@content2zero.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;ve got a situation where I need a block to know about the contents of the node being displayed.<div><br></div><div>I&#39;ve got a block with custom code which starts,</div><div><br></div><div><div>if ( arg(0) == &#39;node&#39; &amp;&amp; is_numeric(arg(1)) ) {</div>

<div>    $node = node_load(arg(1));</div></div><div><br></div><div>That works for when the node is displaying on its own page.</div><div><br></div><div>But my problem is that I am displaying the node using Views and not on its own page. The reason I am doing this is that that the one node that displays in the view dynamically changes depending on the $node-&gt;created time. The view works perfect for this; one URL, dynamic content.</div>

<div><br></div><div>But I need the block to have access to the node object of the one node currently displaying in the View.</div><div><br></div><div>What is coming to mind is to run the same query in the block that the view is running to get the $nid and do the node_load off of that. But I thought there was an easier way. Or do I have access to the View object?</div>

<div><br></div><div>Thanks for your suggestions,</div><div><br></div><font color="#888888"><div>Shai</div>
</font><br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>