view->result as $n) { $node = node_load($n->nid); $node->view = &$this->view; $node->depth = count(explode('.', $node->thread)) - 1; if ($node->depth > $last_depth) { $divs++; $output .= '
'; $last_depth++; } else { while ($node->depth < $last_depth) { $divs--; $output .= '
'; $last_depth--; } } $output .= node_view($node); } for ($i = 0; $i < $divs; $i++) { $output .= ''; } return $output; } }