Add arguments to use any field + selector

joachim - June 10, 2009 - 14:35
Project:Referenced By Views Filter
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I've just coded this up for a site I'm working on.
Sharing it here in case it's of use to anyone else still working with D5 views.

The idea behind this is that you might have several noderef fields on a node, and you're stuck making a view for each one, with a different argument each time.
Instead, use these two new arguments on just one view.
You then use args like "field1/NID", "field2/NID", "field3/NID" to get the noderefs for each field. This is particularly good for embedding views into node templates.

(This is a patch on my SVN, some tweaking may be required. It's fairly clean though. Good luck.)

AttachmentSize
ReferencedByFilter_field_selector.patch4.15 KB

#1

joachim - June 10, 2009 - 14:42

Hmm yeah except I don't mean check_plain, I mean db_escape_string... DOH!

Should be:
$referencing_field = db_escape_string($selector_argument['value']);

 
 

Drupal is a registered trademark of Dries Buytaert.