Links View Function

The function here is doing a couple of rather simple things. Comments speak volumes in this case, so just follow along.

<?php

function garland_views_view_list_Links($view, $nodes, $type) {
 
$term_print = ''; // essential for determining whether to print the Taxonomy as a header.  Set to nothing to begin with in order to do checks against it.
 
$first = TRUE; // Set to true so that we'll know when to close unordered lists.
 
foreach ($nodes as $node) {
   
$term = $node->term_data_name; // Setting what will potentially be our header
   
if ($term != $term_print) { // checking it against the preset one to see if it's new
     
if ($first != TRUE) { // If this is the first run through, don't close the previous <ul> as there isn't one
       
$output .= '</ul>';
      }
     
$output .= '<h3>'. $term .'</h3>'; // Print our header
     
$output .= '<ul>';
     
$term_print = $term; // set our check equal to our current header so that the next time through we won't print the header again, or inadvertently open a new <ul>
     
$first = FALSE; // Set $first to FALSE so that the next new header we have will trigger the close of the <ul>
   
}
   
$load = node_load($node->nid); // We want to include the body of the node, and that's not included in the content sent to us by the view.  The view settings do include this, so I must assume that the default function does something similar to this, but it's ok cause this is easier to manipulate anyway.
   
$output .= '<li><a href="'. $node->node_data_field_link_field_link_url .'" target="_blank">'. $node->node_title .'</a><br />'; // our list item
   
$output .= $load->body; // The afore-mentioned body.
   
$output .= '</li>'; // close our list item
 
}
 
$output .= '</ul>'; // close the final <ul>
 
return $output; // return!
}

?>