Passing Arguments
| Project: | Viewfield |
| Version: | 5.x-1.5 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Any help with this would be very gratefully received.
I have 3 node types:
Films, Reviews, and Articles:
The Node Title for Films is e.g. "Fight Club"
The Node Title for Reviews is e.g. "Fight Club Review" or "Review of Fight Club"
The Node Title for Articles is e.g. "A Critique of Fight Club in Relation to Post Modernity"
I have installed the ViewField module and created a View. This View displays up to 5 nodes which are Reviews or Articles and works correctly. I have embedded this View into every Films node using the ViewField module. I have made this the default View and stopped users editing the node from being able to see this.
What I now want to do is pass the Node Title from the current Films node to the View as an argument. The View should then search for nodes where the Node Title contains *fight club* (using wildcards).
Please could someone give me the steps required to pass the Node Title across as an argument and filter by it in the view?
Thanks very much.

#1
Sorry, I should have added that I don't want to pass arguments using the URL.
#2
Hmmm. OK, it looks like I am doing this correctly as I was able to successfully use a Node Author argument - and yet for some reason Node Title doesn't return any records...
#3
I can make this work if the Node Title is an exact match, so the issue is how to surround the Argument with wildcards (or something similar).
#4
Fixed.
#5
How?
I have a similar project, and would like to know how you solved this issue.
#6
1. In the Arguments for the Viewfield I added [title-raw]
2. In the View itself I added the first Argument as Node Title contains "test"
3. In the Argument handling code for the View I added:
$view->filter[0]['value'] = $args[0];$view->is_cacheable = 0;
Hope this helps.
#7
I've been trying to get this figured out but don't seem to get it... any help would be greatly appreciated.
Drupal 5.
I have 3 custom content types:
* People (name, phone, etc.)
* Committees (name, email)
* Committee Memberships (person_reference, committee_reference, position_title, date)
The Committee Membership type had node references to the other two.
I need to construct a page that displays all Committees with the People in each one. This page would show some other information displayed besides the Person's name and Committee's name, i.e. other data from these two tables. For example:
Is this doable with Viewsfield?