This is a very basic question from a still-learning admin of a new Drupal based site.
Taxonomy is very cool, no question. So I created a small hierarchical vocabulary called "Geographic Region" of the form-
UK
--England
--Northern Ireland
--Scotland
--Wales
and tagged a few nodes to test.
Now- the taxonomy search "/category/geographic-region/uk/england" finds all the nodes tagged with England. Ok.
However the search "/category/geographic-region/uk" only finds nodes tagged explicitly with "UK", whereas I would expect it to find ALL the nodes tagged with UK AND any subterms of UK, because "UK" is a hierarchical container of all its subterms.
I'm clearly misunderstanding the use of the term "hierarchy" in the way Drupal uses it, Drupal's taxonomy hierarchy seems to specify a "child of" relationship that does NOT mean "contained by".
Is this a fundamental limitation of the Drupal taxonomy system, or are there options to control this behaviour?
Comments
I believe you'd write
I believe you'd write "/category/geographic-region/uk/all" to force Drupal to include everything under UK. So you have the choice to specify only UK, or UK and anything under it.
There's also a module (I forget the name) that'll automatically take care of the "all" part, if you always want it in effect without having to type it.
--------
Easy Drupal Admin Manual, Drupal questions, other stuff for the newbie: http://www.drupalace.com
Automatic "/all" suffix on taxonomy searches
BTW some pointer to help me find that "auto taxonomy suffix" module would still be of great interest. If I can find it i'll point our developers at it and see if they will integrate it.
Regards: Colin
Taxonomy Force All, I
Taxonomy Force All, I believe.
http://drupal.org/project/taxonomy_forceall
One of those little gems you really only discover by sitting down to read through entire module lists. Not everyone's cup of fun, but there's always some bit of treasure in there!
--------
Easy Drupal Admin Manual, Drupal questions, other stuff for the newbie: http://www.drupalace.com
Thanks, By following
Thanks,
By following various links in the docs I had managed to independently come to this conclusion. In fact by manually hacking the URL alias settings i've got one alias working exactly as I want-
category/geographic-region/uk is aliased to taxonomy/term/nnn/1
(where nnn is the term id)
Unfortunately the aliases are bulk-generated by pathauto, and pathauto is designed to alias FROM a physical path (taxonomy/term/nnn/1) to a logical one, not to alter the physical path setting in the URL alias table.
I'm the admin of this site, not the developer, so installing a module is not the ideal solution. I found another approach here- http://drupal.org/node/247205 using views, I may have to give that a try.
Regards: Colin
BTW I forgot to mention, the
BTW I forgot to mention, the "recurse depth" parameter on the end of the taxonomy term URL (/1 or /all) only seems to work for physical URLs.
I.e:
taxonomy/term/nnn/1 (works)
category/geographic-region/uk/1 (path not found error)
Regards: Colin