Hello,

I'd be thankful for any hints or tips on:
"an alpabetically sorted index of terms"
For instance:

----------------------------------------------------------

INDEX OF TAXONOMY TERMS

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Anchor-Links: AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ

AA

Aarvark (1 Node tagged)

AB

Abbeygale (6 Nodes tagged)
Abdomen (2 Nodes tagged)
Absolom (1 Node tagged)
absolute (21 Nodes tagged)

AC

ac/dc (5 Nodes tagged)
aclimatization (1 Node tagged)
acolythe (2 Nodes tagged)

....
....

AZ

azymuth (1 Node tagged)
azmodan (1 Node tagged)

----------------------------------------------------------------------

I am thus far:
this Code-Snippet from Sverre creates a list of ALL taxonmy terms for a given vocabulary - Looks like this:
Screenshot of the Resulting List.
Thats a good start, but the query is not filtered by "A", or "B" or "C"

<?php
// This snippet produces a list of terms within a given vocabulary
// Includes links to terms and number of nodes.
// Shared by Sverre - September 2006
// Drupal 4.7 tested

$vid = 8; // Change to appropriate vocabulary id

$result = db_query(db_rewrite_sql('SELECT t.tid, t.name, t.description, COUNT(*) as count FROM {term_data} t INNER JOIN {term_node} tn ON t.tid = tn.tid WHERE t.vid = %d GROUP BY t.tid, t.name ORDER BY weight, name', 't', 'tid'), $vid);
$items = array();
while ($category = db_fetch_object($result)) {
  $items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid);
}

if(count($items)) {
 return theme('item_list',$items);
}
?>

How do i have to query the DB so that its result would be filtered by Initials?

Stephan

Comments

Stephan_M’s picture

The german drupal community has helped me.

In case anybody needs the solution:
This is what helped me. Worked at once. Did what i asked for.
http://drupal.org/node/74715