Needs work
Project:
Entity Translation
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2013 at 09:07 UTC
Updated:
5 Feb 2013 at 09:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
nikosnikos commentedHere's a patch that add the language selector
Comment #2
fabsor commentedThe patch works fine, but couldn't you just add a filter on entity_translation.language after adding the relationship instance to achieve the same thing? I would like to avoid adding filtering functionality on the relationship if it's not necessary.
Also, a small review:
Instantiate the array before using it ($join->extra = array())
Comment #3
nikosnikos commentedThanks fabsor for the code and functionality review.
I tried to do what you say : create a relationship with entity_translation and filter this relationship with the language. But it had no effect (or not the one I was expected, I don't remember). Nevertheless, your review make me think that it should have work (I wasn't really sure about that) I have to make some more tests to see where there's something wrong...
Comment #4
nikosnikos commentedOK, here's my use case.
I want to display a views with these rows :
So I add three relationships with entity_translation for each languages (fortunately I only have three languages)
If I use filter to say to each relation in which language I want it, the rows are these :
There's only those that are translated in the three languages.
Now if I use my patch, I have what I want.
I attach, my views exports. The first (views_export-nodes_translations_ok.txt) will only work with my patch, the second, should work without my patch.