Posted by joachim on June 10, 2009 at 2:35pm
Jump to:
| Project: | Referenced By Views Filter |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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.)
| Attachment | Size |
|---|---|
| ReferencedByFilter_field_selector.patch | 4.15 KB |
Comments
#1
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']);