Closed (works as designed)
Project:
Flag
Version:
6.x-2.0-beta3
Component:
Views integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Sep 2010 at 20:28 UTC
Updated:
29 Sep 2010 at 12:58 UTC
In using the Flag module in a multilingual site we are encountering the foll. issue: the goal is to show translated flagged content if available or default flagged content if not available. In the query generated by views we find that nid is used to do the match with content_id. For our purposes tnid would work better.
So instead of:
SELECT node.nid AS nid,
node.language AS node_language,
node_weight.sticky AS node_weight_sticky
FROM node node
INNER JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 6
we would want:
SELECT node.nid AS nid,
node.language AS node_language,
node_weight.sticky AS node_weight_sticky
FROM node node
INNER JOIN flag_content flag_content_node ON node.tnid = flag_content_node.content_id AND flag_content_node.fid = 6
What is the best way of doing this in Flag or Views?
Comments
Comment #1
mooffie commentedIf that's all you need then bring in the "Node translation: Source translation" relationship. Then pick this relationship for all the flag fields/filters/relationships (you'll see a new dropdown).
I'm not sure this is all that's needed for a i18n site. Let us know how it's going.
(And check out this page if you want to show flagging links.)
Comment #2
mooffie commentedWe have't got a reply from the asker. I'm closing this.