I'm probably missing something very simple here, but I can't seem to figure out how to do it. I want to be able to display all nodes from all subcategories, as well as the category selected. i.e. the "blog" taxonomy on my site has terms set up like this:
all
-- General
---- announcements [a]
---- background
---- news
---- quiz
---- work
-- Home Brewing
---- Beer
---- Mead
---- Wine
-- Pets
-- Rants and Ponderings
-- The Weird and the Interesting
-- Travel
---- Canadrian's Great British Adventure
I would like to be able to visit the term "all" and have it display the nodes from all of the subcategories, not just nodes whose category is set specifically to "all." Or to visit the term "Home Brewing" and have it display all nodes from "Beer," "Mead," and "Wine." Is this possible? I thought that was the way categories were supposed to work. It's how they work on other blogs, like WordPress, etc. Any ideas? It would also be nice if I could display all nodes in a taxonomy, without having to create terms like "all," but I can't seem to find any way to do this either.
Comments
'all' depth in the URL
You can add '/all' to the end of the taxonomy term URL. If your site is at example.com, and the 'Home Brewing' category is term ID 42, the URL example.com/taxonomy/term/42/all would show all nodes categorized in 'Home Brewing' or any of its subcategories.
(Username formerly my full name, Richard Eriksson.)
Nice, Thanks.
Nice, Thanks.
Vocabulary
Excellent, thank you! Is there any way to do this with all terms in vocabulary? i.e. example.com/taxonomy/vocabulary/4/all
----------
"Being tired is like playing mind games with some of the pieces missing."
- Canadrian
I am a proud member of the ElectricTeaParty.net online community.
How about breadcrumbs?
This is great, but is there a way to make the '/all' option default for the breadcrumbs that show up when a subcategory query is done?
For instance, if there are nodes for "subcategory" and no nodes for "category", searching for "subcategory" will show its nodes with a breadcrumb trail of "Home>>category". Clicking on the breadcrumb "category" will show a page that says, "There are currently no posts in this category," which seems counterintuitive.
I'd like to see all nodes for the subcategories of "category" when I click the breadcrumb. Any way to do this?
Thanks,
Gib
I'm working on the same
I'm working on the same problem this weekend, and have mostly solved it with views. Then I've done a bit of custom work to round it out and get the breadcrumbs right.
Try starting with the 1 deep taxonomy view, then change the depth option to something like 4. It builds a complex query with 4+ joins, but you get 4 levels of subterms under the term you specifiy. Use the smallest depth you can get away with. This is your new term view.
Then, duplicate that view, get rid of the argument, and add a filter parameter for the vocab you want.
Use pathauto for nice tree-like URLs. I pulled some code from the "taxonomy context" module to generate nicer breadcrumbs that fit with the vocab views. Also, an empty branch of the term tree doesn't display the breadcrumb using this method, so I had to manually display a breadcrumb with some php code in the "empty text" field on the view.
Later,
Chris.
http://www.trailheadinteractive.com
--- Featured Projects ---
http://www.montanakitesports.com
http://www.cmrussell.org
http://www.tdandh.com
http://www.cccsmt.org
http://www.universalsemensales.com
http://www.trailheadinteractive.com
Not the best practice but works great
This is not the best practice to achive that but still... Open up taxonomy module (modules/taxonomy/taxonomy.module) goto line 1391:
and add . '/all' to the breadcrumb:
Don't forget to do the same when you upgrade your core :)
Goodluck,
Uzbek.
-------------------------------
Sites for uzbeks and Uzbekistan:
Uzbek Lyrics Database
Uzbekistan Forum
I show subcategories under taxonomy description for a parent cat
This is for Drupal 6
Here is my article with code snippets - http://www.rbgrn.net/diy/content/194-drupal-taxonomy-how-to-add-list-cli...
It works really well for me and wasn't hard to implement. You just need to modify your theme and override one of the taxonomy theme functions.
adding "/all" doesn't work
I would like to do something similar, but without using "taxonomy/term/.."
I would like to use "www.site.com/category/category-name/all", but that doesn't work, although "www.site.com/category/category-name/" gives all the results for the category named "category-name", without its sub-categories...
any ideas?
edit: the "category/..."-string is an url-alias for the "taxonomy/term/..."-string (I'm a noob incase you didn't notice...) - but anyway: adding "/all" doesnt work for me - could it be that i have to use a 'translation' of "/all" instead (my site is in dutch)?
[SOLVED] - adjusted depth for taxonomy-term view
Found the answer here:
http://www.pixelclever.com/how-show-all-nodes-tagged-with-children-terms...
The /all option doesn't work
The /all option doesn't work for me in Drupal 7.
Is there really no other way to do it than to go through View???
Diplay nodes of Subterms in the parent term taxonomy page... That seems like a natural request.
Hi there, any solutions on
Hi there,
any solutions on this?
I'm on D6, Views 2.
I tried all (and the German version of it) which leads to 404.
More over I sat:
Depth:
The depth will match nodes tagged with terms in the hierarchy. For example, if you have the term "fruit" and a child term "apple", with a depth of 1 ...
to 3, which should work as well in my understanding.
But it doesn't.
So - how can I show the nodes of the subcategories within a view?
Transmitter