I am trying to call drupal_goto(x) from within the (PHP) body of a node that has a viewfield field attached. However, I cannot figure how to access the results of the viewfield view from within the (PHP) body of the node. I have tried the approach of
'$node->field_view_source....
But this variable doesn't seem to hold the data that I want (used var_dump() to verify this). It seems to have mostly the CCK setting info for the field. This variable doesn't seem to be useful in the node template file either (however it does seem to have a couple more elements).
How can I access the results of the viewfield view (a node id from a view that, for example, picks a random node from some specified set of nodes) from within the node's (PHP) body block or from within the node template file, or somewhere else?
I know that I can display the node content by using a page-view or by using the out put of the viewfield. However, I want to goto the actual node specified by the node id.
The closest that I have gotten so far is to use an ugly session variable hack that doesn't even seem to operate reliably.
Can someone tell me how to do this? Is it possible? Does this capability need to be added to the viewfield module?
Thank you.
--Ray
Closed: outdated
1.0
Miscellaneous
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.