Hi, I am a user of EVA module, and I have some problem to ask for help.
When i use this module, i know how to use this with node reference,
but when i use this module with term reference in the same way of using node reference,
i didn't get what i want, and i try to search some article about this by google or in drupal.org,
i got none about this, what can i do with term reference?
and i have try like this:
I made 3 node types (here we named them A, B, C), and each of these types had a Term reference field,
and i made a view which type is entity content, in this view, i configure EVA settings the same way of using node reference,
entity type is node, bundle is 1 of my node types (Type A), and arguments i select the 3rd one and use token of the term reference field,
out of EVA settings, i select the other 2 node types (Type B, C) in FILTER CRITERIA,
and the CONTEXTUAL FILTERS of this view, i select the term reference field of other 2 node types,but, i didn't get the list of these 2 node types (Type B, C) which have the same term with one node of the 1st node type (Type A).
and i look into the token of 1st type (Type A) node, i found that the token of tern reference field is a string (the name of the term).
After that, I don't know what to do, now.
I hope someone can help me with this, thank u.
Comments
Comment #1
spiritfelix commentedOK, I have try like this:
in the EVA settings, use token of the term reference field,
and in the CONTEXTUAL FILTERS of this view, i select "Content: Has taxonomy term ID", and use "Specify validation criteria" with "PHP validate code" like this (has no "<?php?>" tags):
and checked "Allow multiple values".
it seems works now.
maybe this is the way to use "term reference" with EVA.
Comment #2
gopherspidey commentedThis is the way I did it without the above php.
I did just like you and I set the EVA Term token of "[node:field_area]"
I added the term field to the field section
I added a Relationship for that same field. I also made it a required relationship.
Then I added the Contextual filter on the now reference term name.
Comment #3
gopherspidey commentedAlso see: #1111222: How to use it?
Comment #4
Morten Najbjerg commentedI found this a bit hard too.
Here's a step-by-step guide:
1) Create content-type with a term reference field
2) In views create a "Entity content" view
3) In ENTITY CONTENT SETTINGS set the following parameters:
Entity type:Node
Bundles: the-content-type-you-created-in-#1
Arguments: "Use tokens from the entity the view is attached to", and write [node:field_name] where field_name is the name on your term field from the contenttype.
4) Under contextual filters add "Has taxonomy term ID"
Choose: Hide view or Display all results
Check the Specify validation criteria checkbox
Validator: Taxonomy term
Choose Your vocabulary
Under FILTER VALUE TYPE choose "Term name converted to term ID"
That's it. Unfortunately this does not works with multiple terms selected in the content type.
Comment #5
mkadin commentedThis isn't really an EVA question, but more about relationships in views. #2 and/or #4 should work fine for you.
Comment #6
vaccinemedia commentedMorten: You are a life saver! I've been searching for this exact solution for a few hours now but your post saved the day!
Comment #7
nellngun commentedThat's it!! thanks, just can't forget to add your taxonomy reference in fields (then can hide it) - i forgot to add this field and took me hours to make it work.
Comment #8
kari.kaariainen commentedIf your term names happen to have forward slashes (1/2016, 2/2016 etc), use [node:taxonomy-vocabulary-6:tid] instead (replace "taxonomy-vocabulary-6" with your own vocabulary name). Then your Filter value type would be Term ID.