Edit

Drupal Template Coding Similar by Taxonomy

<ul class="item-list">
<?php

$terms_nood = taxonomy_node_get_terms_by_vocabulary($node,6);

$terms = taxonomy_get_tree(6);

foreach($terms as $term){

	//$tagged = taxonomy_term_count_nodes($term->tid);

	if( $term->name == arg(1) || array_key_exists( $term->tid,$terms_nood ) ){
		echo("<li class=\"collapsed tag-category-".$popularityCategory."\">");
		echo("<a href=\"/visual/".$term->name."\" class=\"active\">".$term->name."</a>");
		echo("</li>\n");
	}

}

?>
</ul>


<?php
if(arg(0)=='node'&&isset($node)){
    $vocabularies = taxonomy_get_vocabularies();
    foreach( $vocabularies as $vocabulary ){
        if( $vocabularies ){
            $terms = taxonomy_node_get_terms_by_vocabulary($node,$vocabulary->vid);
            if( $terms ){
                echo('<div>');
                $links = array();
                echo('<h3>' . $vocabulary->name . '</h3>');
                foreach( $terms as $term ){
                    $term_uri = taxonomy_term_uri($term);
                    $links[] = l($term->name,$term_uri['path'],array('rel'=>'tag','title'=>strip_tags($term->description)));
                }
                echo(implode(', ', $links));
                echo('</div>');
            }
        }
    }
}
?>


<?php #if ($terms): ?>
<?php
$vocabularies = taxonomy_get_vocabularies();
foreach( $vocabularies as $vocabulary ){
	if( $vocabularies ){
		$terms = taxonomy_node_get_terms_by_vocabulary($node, $vocabulary->vid);
		if( $terms ){
			echo("<div>\n");
			$links = array();
			echo( "<h3>" . $vocabulary->name . "</h3>\n" );
			foreach( $terms as $term )
				$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => strip_tags($term->description)));
			echo( implode(', ', $links) );
			echo("</div>\n");
		}
	}
}
?>