I am creating a classified sections with the following vocabularies:

LOCATION (vocabulary 1)
CATEGORY (vocabulary 2)

the vocabularies each have taxonomy terms within them.

LOCATION has a multiple hierarchy taxonomy list within it like so

LOCATION
---ENGLAND (tax 1)
---English Cities (tax 2-39)
---IRELAND (tax 40)
----Irish Cities (tax 41-55)
---SCOTLAND (tax 56)
----Scottish Cities (tax 57 - 60)
----WALES
--------Wales Cities

CATEGORY vocabulary has 9 other taxonomies

Now what I want to achieve is to provide, a navigation block with the respective list of each country's cities

eg: a block called England will show

Bath (3)
Bedford (4)
London (300)

a block called Scotland will show

Dundee (2)
Edinburgh (88)

For the CATEGORY voicabulary I would like to do the same thing as well

category A (7)
category B (3)

The goal is to achieve a tabbed block for navigation

with the following tabs

ENGLAND | SCOTLAND | IRELAND | WALES

---------

TRIAL A

I have tried using the panel-by-term that comes with the panels and views bonus, but this just brings out one continous list of all taxonomies in the LOCATION vocabulary

TRIAL B

I used this php code inside a block, again it brings up all the taxonomies with the LOCATION vocabulary

<?php

$vid = 1;  // Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$items = array();
$terms = taxonomy_get_tree($vid);
foreach ( $terms as $term ) { 
    $count = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $term->tid)); 
    $items[] = l($term->name, "taxonomy/term/$term->tid") . " ($count)";
}
if ( count($items) ) {  print theme('item_list', $items);}
?>

------

I hope there is someone out there who can help me please

THANK YOU

Comments

swopit’s picture

I am working on something similar at the moment.
Did you already come up with a suitable solution for your issue? If not maybe we could join forces...

Cheers, Patrick

droople’s picture

Please share if you do!!