To sort referenced nodes based on their delta, as per the instructions on #1257780: Sort Order Based on Delta, I run into problems where duplicate nodes are displayed in the view when multiple parent nodes are referencing the same child node. Setting the view to distinct helps solve the problem, but if multiple parent nodes reference the same child node and distinct pics the wrong parent to get the delta, the sort will turn up wrong.

I'd like to use the second argument as a node id that narrows down the reverse reference to the parent to just the node currently being viewed. When I do that, however, I get an error that the second argument needs to be Global:null. I wrote a patch that allows you to use Node:NID as the second argument only if your view's base table is node and you have the Reverse Node Reference module enabled.

CommentFileSizeAuthor
#1 use_nid_as_2nd_arg-1395650-1.patch832 byteschromix

Comments

chromix’s picture

StatusFileSize
new832 bytes

Here's the patch

Argus’s picture

Status: Active » Needs review