[warning: I'm a relative noob]
I have three vocabularies (va, vb, vc). Each contains several terms (ta1, ta2... tb1, tb2... tc1, tc2...). Forum posts were modified to have a pick box that tags the posts with a term from va, vb, vc.
Now I would like to show some complex views like:
"show me everything tagged with (ta2 or ta3) and (tb5 or tb6) and (tc1 or tc2)".
Where users get to pick the filter terms from a web form, then mash a Go button.
I saw the taxonomy/term/x,y,z and taxonomy/term/x+y+z formats. I assumed that was the foundation of the and/or structure. Not so (especially in D7). I saw tf_views and taxonomy filter but I sure can't see the AND/OR capability.
I could sure use some direction on how I should proceed.
Thanks for your help.
Jon B.
Comments
Use Views Module !
You can use Views to do it.
After installing and enabling Views, create a new view of type 'node'. While you are in the 'Default' pane, add an "argument" by clicking the '+' next to the box titled 'Arguments'. Set 'argument Groups'=Taxonomy, and select the checkbox: 'Taxonomy: Term ID' .
When you proceed, you will find the "Validator options" settings. set: Validator="Taxonomy Term", choose the Vocabularies you want, and set: Argument type="Terms IDs separated by , or +", finally select the "Allow multiple terms per argument" checkbox.
Click Update and then save the view.
Returning to the main settings page of the view, add a display of type: Page. It will automatically takes the above settings. Set the 'Path' property for it to the path you want, let it be for example: 'test'.
Save the view and exit. Now, you have a path that filters the contents by their terms IDs:
yourhost/test/1,2 or yourhost/test/1+2 .. etc.
Regarding Taxonomy Filter, it requires both tf_views and Views to work in D7. I didn't complete testing it yet. When correctly configured, it should provide menus (for site visitors) that enable content filtering without need to edit the site url.
Views -
Thanks for the great write up. I'm running into a problem where (as I save the page) it says:
Display "Defaults" uses fields but there are none defined for it or all are excluded.
Display "Taxonomy View Page" uses fields but there are none defined for it or all are excluded.
If I change the view to "node" the errors go away but when I access /test/14 I get "Page not found" (but /taxonomy/term/14 brings up a page).
I'll keep tinkering...
Thanks for the help.
Getting closer - What about AND/OR
Ahhh, slowly I'm learning. I added two fields, one showing the node title and one showing all the taxonomy terms on that node. That cleared up the error.
Now I can go to 14+27 and it looks like I get all nodes marked with 14 OR 27.
If I go to 14,27 (what I would hope would be all nodes marked with 14 AND 27) I get another error:
Notice: Undefined variable: value in views_many_to_one_helper->add_filter() (line 868 of /home/develop/public_html/sites/all/modules/views/includes/handlers.inc).
A missing step !
Hi Jon ..
I am really sory, i forgot to mention a step in my first replay to you. It is about the 'view style'. In fact i think it is better for the view style in this case to be a node, not field .. here you are the difference between the two: the node style will make the view return back nodes (or the thing that you select earlier in the first view creation page), those nodes appears (as default) in shortened format "teaser" for each. The field style -on the other hand- will make the view return parts of the nodes (title, body .. etc) depending on the fields you selet.
In fact i didn't try to apply a taxonomy filter view using field style, so i dont understant -for now- what the error is about.
So, why dont you try to creat a new view, the node style way ?
Refer to my first replay and start again inserting the missing step:
Before adding the argument, find the view settings box that titled ''Style settings", change the property 'Row style' from 'Field' to 'node', and then go ahead.
Note: don't let the path for the new view page conflicts with the old one! remeber to choose a new one!
Now i hope everything will be fine.
Tip: There's a module called 'Advanced Help', it is a help system that displays help content written by modules developers.
if you add it and enable it you will find a small help icon in the title of some settings boxes inside the view setting page (and other views settings pages), that will popup a help window on click.