How to render multiple values of node reference in the form of an ordered list without views? I have a node reference field that references another node and has multiple values. I want to get an ordered list of the output of that field and display it in the custom node template. I am rendering the node reference as a cck block. Any help or guidance would be greatly appreciated. Thanks.
In D6, you could do something like this:

print '&lt;ol&gt;';
foreach ($node-&gt;field_whatever as $foo) {
  print '&lt;li&gt;';
    $bar=node_load($foo['nid']);
    print l($bar-&gt;title, 'node/' . $bar-&gt;nid);
  print '&lt;/li&gt;';
}
print '&lt;/ol&gt;';


In D7 you'd have to throw in the node language stuff and there might even be something more exciting built in as well but I think they all use divs instead of lists.  (In both you could also create a content field template for this instead of hardcoding it in your node template)