how can one sort node reference results??

funkeyrandy - March 24, 2008 - 03:08
Project:Index CCK Node Reference
Version:5.x-0.1-beta1
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Description

hello...i have successfully loaded an audio teaser list by having users select nodes via node reference in the cck edit form for an album, and then for each selected node loading the node view:

<?php
print strip_tags($title)
?>

<?php
 
foreach ((array) $node->field_your_music as $related) {
   
$related_node = node_load( $related['nid'] );
    print(
node_view($related_node, TRUE, FALSE, FALSE));
  }
?>

however, i need to sort these node returns because they are the audio files for an album track listing....how can this be achieved?...im loading the whole node, so all fields should be available. i would ultimately like to sort these using the track number from the audio module's medatadata filter....

thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.