开发者

View of nodes and their translations

I'm trying to create a view of nodes and their translations. Specifically, I want each row to show the node title for each language.

The way I'm doing it right开发者_StackOverflow now is by filtering the view by a specific language, then adding one relationship of type "Node translation: Translations" for each language on the site. I can then choose the "Node: Title" field, once for the original language and once per relationship.

The problem with this approach is that the nodes that don't exist in the filtered language, but exist in other languages, are not included in the view. That's what I need help with.


I finally got around to solving this (on Drupal 7).

The idea is to filter the view by Content translation: Source translation, then adding one Content translation: Translations relationship for each language.

In addition, a special join handler is used to handle nodes that have no translations. The handler code is on GitHub.

I've created a demo of this approach.


One of way: Just do it without relationships, but use sorting via "Node translation: Translation set node ID", so you get ordered list of nodes, there translated versions of node will followed one by one...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜