<?php
$vid = 1; /* <---- put correct vocabulary ID here */
$terms = taxonomy_get_tree($vid);
print "<div class=\"item-list\">";
print "<ul>";
foreach ( $terms as $term ) {
$tcount = taxonomy_term_count_nodes($term->tid);
print "<li>".
l($term->name." (".$tcount.")",'taxonomy/term/'.$term->tid, array('title' => $tcount." posts in ".$term->name)).
"</li>";
} /* end foreach */
print "</ul>";
print "</div>";
?>
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Showing posts with label menu. Show all posts
Showing posts with label menu. Show all posts
Bash menu
Try this menu script for bash scripts:
while getopts ":u:a:s:v" options; do
case $options in
u ) uname=$OPTARG;;
a ) attrs=$OPTARG;;
s ) searchattr=$OPTARG;;
v ) att=ALL;;
h ) echo $USAGE;;
\? ) echo $USAGE
exit 1;;
* ) echo $USAGE
exit 1;;
esac
done
echo uname = $uname
Labels:
bash,
idea,
linux,
menu,
parameters,
productivity,
scripting
Subscribe to:
Posts (Atom)