Hello,
Please, consider the following example:
I create one vocabulary named "Twentieth century".
Inside that vocabulary I create the terms for each decade (e.g.: 60’s, 70’s, 80’s…), and inside each decade I create the sub-terms for each year of that decade.
This vocabulary should look something like this:
Twentieth century (vocabulary name)
(…)
50’s (term)
--1950 (sub-term)
--1951
--1952
--1953
--1959
60’s
--1964
--1966
70’s
--1975
(…)
I will then tag each node using the years (sub-terms) in that vocabulary, I'll allow multiple selection of sub-terms so that each node can span for some years.
For instance, imagine one given event lasted between 1952 and 1955, I'll then create one page named "Event X" and select from the vocabulary list the sub-terms "1952", "1953", "1954" and "1955".
I would them expect to get all the events belonging to a certain decade, by selecting the term... but that's not happening
Now, using drupal’s jargon ;0), why can’t I get all the child sub-terms from one given parent by selecting that parent?
I’m only using the default taxonomy.module, must I have another module installed? Or is there a special tag I must apply to the url?
Thanks, Gonçalo Dumas
Comments
The simple solution would be to select also 1950s
The simple solution would be to select 1950s as well as 1952, 1953, ...
Is the 1950s a container or a taxonomy term in it's own right?
Paddy.
http://deburca.org, and http://amadain.net
Paddy.
http://deburca.org
This example... is just an example!
This example... is just an example! The focus here should be the parent/child relation - not the content, at least that was my intention :o)
I've already though about using the option you described, but I was hoping Drupal had it though some how... Maybe there is an easy solution for this (I found lots of similar questions on the support forum and many of them weren’t answered... I though: maybe he/her found the answer himself... :o)
Wicked stuff...
I was thinking that one could assign the "50's" term to something (a node?) that would then query the site for all nodes related to all the 10 sub-terms (1950, 1951, ..., 1959)…
But them I tried the aliases (path) module to create a vocabulary navigation scheme in the following fashion:
taxonomy/term/10 (system) = taxonomy/term/15+16+24 (alias)
Being that …/term/10 is the system’s url for "decade 50’s" term and that …/term/15+16+…+24 is the url for the combination of all the sub-terms that represent the years of that decade.
And it works!!!
The only problem is that all this “code” shows up in the address and the years appear in the title bar… now that I was so happy with clean urls… :o(
The only problem is that all
First alias .../term/10/ to ''decade 50's'' and then for 'decade 50's', alias .../term/15+16+...+24
You will have to think through the presentation a bit, though.
I tried...
the first alias would be:
(system) »» (alias)taxonomy/term/10 »» taxonomy/term/13+14+...+22
and them the second alias:
(system) »» (alias)taxonomy/term/13+14+...+22 »» Decade_50
But it didn't work... :o(
Sorry, I got the process
Sorry, I got the process wrong. You only need to create one alias for the term that corresponds to 50s, but include the sub-terms. Going by your example, this would be:
system: taxonomy/term/10/13+14+15+16...24
alias: 1950's
So, when you go to www.yoursite.com/1950s, you will get a list of all nodes tagged with the term '1950s' as well as the sub-terms (the years 1950-1959). The trailing slash after 10 is important because it tells drupal about the depth you want to display.
This is off the top of my head, so please do tell me if this also doesn't work.
That is a good alternative
That is a good alternative to the use of yet another module.
[wispering]You see, I’m using the head version of drupal and taxonomy_menu isn’t ready yet =)[/wispering]
So I created an alias in the following fashion:
(system) »» (alias)Taxonomy/term/10 »» taxonomy/term/10/13+14+…+22
The only issue in using this alias is that I’ll get something like: http://yoursite/taxonomy/term/10/13+14+…+22 in the address bar rather than, for instance: http://yoursite/decade_50.
The only issue in using this
No, believe me, you won't because you would have aliased the term already. If and when you use a menu, you simply need to use the aliased path (www.yoursite.com/decade_50) rather than the system url.
Also, you need to create the alias with the main term and sub-terms as I mentioned in my previous post.
You have a point there...
You have a point there, I don't need to use aliases... if I base this menu on links and not taxonomy terms… and that’s what I’m going to do, so thanks for your help.
But the relation parent >> child within a vocabulary isn't dinamic at all, it's just something that allows you to organize informations – and that’s dissapointing.
Either way, it’s the best software in the world, and I’m not getting my hands of version 4.7 – its beautifull!!
Gonçalo Dumas
Glad to be of help.
Glad to be of help.
I don't know exactly what you mean by dynamic relationships between parent>>children within a vocabulary, but for starters, there is 'Related terms'. I just created a vocabulary with the terms 'Requests' and 'Opportunities', where people can make 'Requests' (a term) of various kinds (sub-terms). For some other users, these requests become 'Opportunities' (again, term with sub-terms). If I choose to make the sub-terms of 'Requests' as related terms of 'Opportunities', it is possible to define some kind of a relationship between the parent and child terms.
Another example is a vocabulary with the child term of 'Resouces' and sub terms such as Audio, Video, Articles, Links, Documents, Reports etc. One of the terms of this vocabulary is also 'Reports'. When I created this term, I chose to make Audio, Video, Articles, Links and Documents as related terms. Somewhat crude examples, but I think you get the point.
For a proper explanation of related terms, please read this thread:
http://drupal.org/node/34627
I know this might sound
I know this might sound confusing when using the wrong examples. So I’ve decided to place here a living example of that what I’m saying.
If you go to this test site I’m working on (it’s about a Portuguese intermedia artist – Ernesto de Sousa) you will find the related terms to each node under its title (these terms are only there for the building of the site, I’m planning to hide them once the site is working)
For instance, visit page: http://www.caderno.net/dom_roberto, you’ll see the terms related to the time frame this project took. Now choose the term “1960”, it will take you to a page where all the nodes tagged with “1960” are (there’s only one tough). Over the title, you’ll find “Década de 60” (60's decade), that’s the parent term of the sub-term “1960”.
“Dynamically” speaking, I would expect that by cliquing on “Década de 60” I would have all the nodes tagged with its child terms.
“Dynamically” speaking,
I understand what you mean. It looks like it has to be done manually using the method of combining terms that we discussed earlier.
Patchwork, you wouldn't
Patchwork, you wouldn't think it from reading the description but what you want is the Taxonomy Menu module .
It will create additional taxonomy views that you can customize with the option to 'display descendants' that will do the kind of recursive listing you are asking for.
-zach
------------------------
harkey design
: z
Thanks
I once had that module installed, but at that time it didn’t understand its real capacities… back them I was yet trying to understand the taxonomy concept …
I’ll install it again, thanks