How to create multi level taxonomy?
Hello,
I've read a lot of articles about taxonomy and each article tells "you can do everything with Drupal's new taxonomy feature...", but doesn't tell how can I do it.
I'd really like to learn how can I create such taxonomies:
first example:
1 level - lyircs main page with list of english letters (A, B, C, D, ... , Z)
2 level - list of all artists which name begins from selected letter (for example, for M letter artists are Madonna, Moby, Metallica etc)
3 level - list of all songs of selected artist (sorted by albums would be great)
4 level - the content, lyrics of selected song
second example:
1 level - main page with list of all continents of the world
2 level - list of all countries on selected continent
3 level - list of all regions of selected country
4 level - list of all cities of selected region
5 level - list of all parts of selected city
6 level - list of all shops in the selected part of the city
7 level - the content, description of selected shop
Can you point me to guide for newbies like me please?

Vocabulary: Globe Term level
Vocabulary: Globe
Term level 1
Continents -->
Term level 2: Africa --> Term level 3: Niger --> Term level 4: Cities in Niger
Term level 2: Asia --> Term level 3: Japan --> Term level 4: Osaka
Term level 2: North America --> Term level 2: United States --> Term level 3: Missouri -- Term level 4: St. Louis
This will be a lengthy process, to put it mildly.
----------------------------------------------------------------------
http://www.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français. / Я могу общаться на русском языке.
Thanks for reply. Now I
Thanks for reply. Now I understand taxonomy.
But I have another question. I wonder, how can I browse all these categories? I mean how can I display them all like usual catalog?
Example:
Continents page is here:
http://www.ayva.ru/pal/taxonomy/term/9
Osaka page is here:
http://www.ayva.ru/pal/node/4
I can't see any menu (categories), I can only see it if I go to the last link (Osaka page) and click link called "Osaka". Only then I can see categories on the top of the page:
Home › Continents › Asia › Japan
But even though when I click Asia, for example, I can't see any links to "Japan" or parent "Continents" category.
Here is some php code you
Here is some php code you can use; I found it on this site some years ago and use it often. Set the VID, copy and paste it into a page, and save as php format. You will need to create nodes and categorize them with the right term, or else you will not see anything on the page. Once you are done your page will look similar to the image here:
http://music.bwv810.com/image-galleries/taxonomy
<?php$vid = 1; // Set this number to the vocabulary for which you wish to display a listing catalog
$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)).")";
$termdepth = "";
for ($i=0;$i<$term->depth;$i++)
{
$termdepth = $termdepth . "-- ";
}
$items[] = $termdepth . l($term->name, "taxonomy/term/$term->tid") . " $count";
}
if ( count($items) ) { print theme('item_list', $items);}
?>
By the way, there are a few excellent modules for importing en masse taxonomy terms (such as all the states in the USA, for example). The three I use are taxonomy batch operations, taxonomy manager, and taxonomy_csv (for importing comma separated value worksheets).
----------------------------------------------------------------------
http://www.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français. / Я могу общаться на русском языке.
Thanks for advice bwv, but
Thanks for advice bwv, but I'd really like to use only built-in features to create websites. I wonder is it possible to use taxonomy as usual catalogue with Drupal without handwrote PHP?
Adding menus and navigation
Adding menus and navigation is supported in various ways from add on navigation modules.
Taxonomy_menu does .. menu blocks
taxonomy_context does drill-down navigation, a bit like forums categories
There are others.. like taxonomy_path that does other things
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
Tried few modules, nothing
Tried few modules, nothing worked for me. Directory module does almost what I need, but I'd really like to have "simple hierarchy taxonomy display" module.
I'm confused by this, because 99% of large content sites uses this way of displaying categories (all large lyrics websites, for example).
Use the views module with
Use the views module with Arguments "summary, view as sorted" selected with each of the categories you want. Therefore, page 1 will be continent list, page 2 will have Asian countries, page 3 Japanese cities, etc.
Could you tell me how
Could you tell me how exactly should I set these arguments and where please (if you have a minute)? And how can I connect this view to some specific Taxonomy's Vocabulary?
Or I'd really will be happy to have a link to some tutorial. I can do list of links to all terms in some specific Vocabulary, but it is unstructured. Example:
http://www.ayva.ru/pal/aaaa/
You would have to make each
You would have to make each level a separate vocabulary. This also allows you to not have to create the hierarchy of the vocabularies because the view cuts down the list to cities in Japan, when only Japan nodes are selected. See the location/directory view in the location api as an example.
As far as your single letters in the artists name you'd just have two arguments created for the artist vocabulary, with the first argument using the option field set to 1 to display only first letters in artist names while the second argument would then display all artists starting with the letter selected in the first page. (The location/directory does this with city names)
See the location/directory
Can you give me a link to it please? I can't find it in Downloads > Modules > Location
It's part of the standard
It's part of the standard location module.
http://drupal.org/project/location