Help for passing the nid of nodes when part of a view
stacysimpson - June 16, 2009 - 11:53
| Project: | View Reference |
| Version: | 6.x-2.9 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have been using viewreference fields successfully for awhile and there are several methods to pass the nid when in a full node view (I.e. default parameter using the URL, etc.). However, I need to display this field as part of a 'Table' style view, which means that I need to somehow pass the nid as a parameter without relying on the URL. Is this possible?
I've been looking into various methods to get this data for a couple days now and still unsuccessful. I've also tried separate fields 'computed field' or 'dynamic field' and still cannot get the nid to the viewreference field. Any help is appreciated.

#1
Hmm it seems the method I've used to evaluate the PHP code prevents this information from being available. I will work on changing that soon.
#2
Well, I finally figured out a work-around. I had to create a custom 'views-view-field.tpl.php' theme for the view/field. In there, the node identifier is available: $row->nid. It would be nice to have a cleaner solution though...thanks!
#3
New version can access $node straight from the args
#4
Automatically closed -- issue fixed for 2 weeks with no activity.