There is a thing about taxonomy hierarchies I really don't understand.
Lets say I have a dictionary called Places:

Places
+-europe (1)
---france (2)
---germany (3)
---italy (4)
+-asia (5)
--japan (6)
--china (7)

selecting the url http://www.example.com/taxonomy/term/1 (europe) I really would expect to get all the nodes tagged europe (term 1) PLUS all the nodes tagged france, germany and italy (taxonomy_menu behaves this way). Instead I only get the nodes tagged europe.

To get what I want, I should tag every node for continent AND for country, making the whole hierarchy totally useless.

Am I wrong?

Comments

drupalec-1’s picture

If you use book pages, printer friendly format will print all children
-----
Drupal ecommerce, at www.drupalecommerce.com is a new site written using language that Drupal beginners and intermediate users can understand. It has about 300 unfinished pages. 2 tutorials for views module under "Modules"

mweixel’s picture

selecting the url http://www.example.com/taxonomy/term/1 (europe) I really would expect to get all the nodes tagged europe (term 1) PLUS all the nodes tagged france, germany and italy (taxonomy_menu behaves this way). Instead I only get the nodes tagged europe

It is my experience that taxonomic hierarchies are not walked automatically. In your example, you get the top level term (Europe), because that is what you asked for. The syntax you need to collect the appropriate child terms is http://www.example.com/taxonomy/term/1/all. The /all modifier will look under the requested term and present anything that was tagged with a child term in addition to those tagged with the top-level term.

So, in answer to your final question, no, don't tag each item for the specific term (i.e. country) and the parent term (i.e. continent), just for the specific country (or countries, I suppose). Then use the proper syntax to collect any child terms in addition to your top-level terms.

Just in case you're interested, you can find a geopolitical thesaurus that has a hierarchical arrangement at http://www.ucis.pitt.edu/giant/thesaurus/ . Just follow the links for Geography > Top Terms.

drupalec-1’s picture

hi. looks like you made uc site? nice site. how did you make the a-z page?
http://www.ucis.pitt.edu/giant/thesaurus/

-----
Drupal ecommerce, at www.drupalecommerce.com is a new site written using language that Drupal beginners and intermediate users can understand. It has about 300 unfinished pages. 2 tutorials for views module under "Modules"

jimsmith’s picture

I just recently wrote a post with a similar question at http://drupal.org/node/58444.

Upon seeing this post with replies I was hopeful to find the answer, but I've found that taxonomy/term/1/all does not work for me on 4.7. It does not show all child terms.

Is some kind of setting needed that will trigger this to work, is this answer faulty, or am I simply to dense to understand?

styro’s picture

In a /taxonomy/term/x/y style url, y is supposed to be used as the depth of child levels to go down to. I haven't tried using 'all', but what happens if you try something like '9' instead?

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

jimsmith’s picture

While /taxonomy/term/x/y and /taxonomy/term/x/all will work in the sense that you can enter either of those in a URL and get a list of nodes created using those terms, it will not work in the assignment of blocks.

I think this will only work the way I want if I use some PHP code where it says "Show if the following PHP code returns TRUE (PHP-mode, experts only)." However, I haven't been able to figure out what that code should be.

coupet’s picture

Just in case you're interested, you can find a geopolitical thesaurus that has a hierarchical arrangement at http://www.ucis.pitt.edu/giant/thesaurus/ . Just follow the links for Geography > Top Terms.

How can we import/export geography taxonomy as developed. Then we do not have to recreate the thesauri for sites that require that functionality.

----
Darly

chook’s picture

I've been playing around with solutions discussed in: http://drupal.org/node/41349. The solution I discussed in the discussion is working for me on a practice site. I'm not sure whether or not it might cause any problems down the road.

good luck,

charles

jimsmith’s picture

Charles: That is a helpful fix for part of the problem. Now, if I go to /taxonomy/term/x, I will see all content created using that term and its children. So thank you, that's a helpful solution that makes taxonomy/term pages perform as I would expect them to perform.

However, I'm still not finding a solution for the main issue here. That is, I can't get blocks to show up in all children of a term, including nodes that are created and assigned to a term.

Let me try to explain this further.

I have blocks that are intended to match each of my parent terms and all children of those terms. When you create a new block and assign it, there is a means of assigning it to specific pages, like /taxonomy/term/x or /node/x. Unfortunately, that's impractical for my situation. It would require that every time new content was created, I'd have to go back to the block and manually add a new assignment.

I want to be able to tell the block to show up automatically anytime a new node, blog, forum post, whatever, is created using a particular term. This is what I was talking about at http://drupal.org/node/58451#comment-110810.

To me, this is how you get the power of taxonomies to really work. It's not just a way of showing a bunch of related links together on a page. It's a way to get related content to interract with each other and to maintain continuity between each other.

drupalec-1’s picture

views should be able to do that. tutorial here
http://www.drupalecommerce.com/node/370
-----
Drupal ecommerce, at www.drupalecommerce.com is a new site written using language that Drupal beginners and intermediate users can understand. It has about 300 unfinished pages. 2 tutorials for views module under "Modules"

jimsmith’s picture

Sorry, but I don't see any references to blocks in this tutorial, so I'm not seeing how it applies to what I want to do.

drupalec-1’s picture

tutorial one is for a block. you just pick block view.
tutorial 2 tells you how to use the filter.
-----
Drupal ecommerce, at www.drupalecommerce.com is a new site written using language that Drupal beginners and intermediate users can understand. It has about 300 unfinished pages. 2 tutorials for views module under "Modules"

venkat-rk’s picture

Not sure if you are still interested in a solution, but what you're looking for is not possible without coding unless you alias all the terms, including the top-level term in a vocab. For example, domain.com/news, domain.com/news/politics/democrats etc.

If you do this, you just need to put news* in the block visibility settings and your block will show all the way down to the actual node view (domain.com/news/politics/democrats/node-title), including on the news, politics and democrats pages.

To do the aliasing automatically, pathauto is a great help.

henns20’s picture

http://drupal.org/project/taxonomy_forceall

but doent work on exposed filters ---at least i couldnt get it to

henns20