Current Node Not Displayed
webavant - February 1, 2008 - 01:12
| Project: | Viewfield |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
It seems like the view omits the displaying the current node. Is there a way to change that easily?

#1
Same issue here.
Using Viewfield to display a GMap view in a node and all the nodes are displayed except the current node.
Not really any idea where to go with this, but would like it to be displayed as I want the current node to be displayed as it's the main reason why the view is being shown on the node.
#2
I am having a similar problem but even worse. I have created a view (a page view) that take as argument the $nid to display the node on a map. The view works fine when I tested it alone by passing nid manually but when I include the view as a field in a node nothing is displayed, not even the map!
This module is great but if it does not work with GMap than it is a really pity!
#3
It's explicitly done in the code, I presume to prevent an infinite loop:
/*** Implementation of views_query_alter
*
* Prevent views from loading the node containing the view.
*/
function viewfield_views_query_alter(&$query, &$view, $summary, $level) {
global $viewfield_stack;
if (!empty($viewfield_stack)) {
$query->add_where('node.nid NOT IN (' . implode(',', $viewfield_stack) . ')');
}
}
#4
subscribing. I need to display views information about the current node as well.
#5
This is by design. However, it would be possible to include the current node in its own viewfield if the viewfield were excluded from the view. That doesn't mean anyone's planning to work on it.
#6
Duplicate of issue 165321.