Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
search data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2009 at 19:46 UTC
Updated:
28 Jan 2010 at 16:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerWhat is your definition of related terms? I don' know such a name in standard-drupal.
Comment #2
kiko commentedTaxonomy terms have two major extensions: synonyms and related terms. For each term you can define its related terms via e.g. Taxonomy manager.
I have now two terms: term1 and rterm2. I define a relation between term1 and rterm2. I'd like to show all the nodes tagged under term1 or rterm2 when I call to taxonomy/term/term1
K
Comment #3
dawehnerUps, i didn't read the issue enough :)
You can use views argument validation php code
Perhaps you have to rewrite the code to use it for term-names not tids.
Comment #4
gagarine commentedHello,
Can i do something similar with filter instead of argument?
Thanks
Comment #5
Dimm commentedComment #6
Faya commentedThanks for this
Comment #7
giorgosk@Dimm
where do I put this validation code from #5 ?
EDIT: I suppose you add arguments (from the Views UI)
but for what kind of argument (taxonomy term perhaps ?)
and what settings go in there ?
Comment #8
kiko commentedHi again
This code almost seem to work, but... What I've done is:
1.- Add a "Taxonomy: Term ID" argument
2.-Validator: PHP Code with the code:
3.- Save
The code seems to capture all the related arguments, but only the first one is passed to the view. I've tried both, checking and unchecking the option "Allow multiple terms per argument" and "Allow multiple arguments to work together", but nothing happens
Any idea?
Comment #9
kiko commentedAlmost solved. The idea is to add a "+" to the implode function, more than a ",". Probably my fault explaining it, I wanted to list everything under a taxonomy term OR its related terms. The code is finally:
But one problem remains. I can list everything under the related terms, but not those listed under the term itself. Any idea?
Thanks in advance
Comment #10
merlinofchaos commentedTry this:
You can make this a bit less code like this:
Comment #11
kiko commentedIt works!
Thanks a lot indeed!
Comment #12
dawehnerSo this is fixed. Anyone want to write some documentation?
Comment #13
kiko commentedDone: http://drupal.org/node/648462
Comment #14
giorgoskI have done as described above but when I use exposed (or even non exposed) filter to view nodes of certain term I don't get the related term nodes
here is an export of a very basic view
what am I doing wrong ?
Comment #15
kiko commentedI think the problem is that this method works properly with arguments introduced via URL (e.g. www.example.com/taxonomy/term/%), but not with filters.
Comment #17
kiko commentedI'm changing this issue to open as I'd like to know if there's some way to add this capability to an exposed views filter. I have searched quite a lot but I couldn't find the answer.
Thanks in advance
Comment #18
dawehnerWhat do you mean with this?
Open a new one, if you can explain what you want.
Comment #19
kiko commentedOK. opening a new one