I want to have a popup that shows a short view that relates to the node it was referenced from once I hover over a "quick view" link. In that view, I need the 'nid' argument. I've tried customizing the popup filter with PHP, but for some reason the PHP won't any of the field values. I've tried using $row, $content, $node, $data, $static, and $result. Basically just guess and check at this point.

Can anybody help me? I tried using the Popup API to just insert a function in the custom PHP field, but that came up as having both the popup() and popup_element() functions being undeclared.

Sorry if my English is bad, but it's really late and I've been at this bug for a while.

And no, even with the NodeReference field added in for each content type (which would be painstaking on a site this big), they don't even give you the teaser on that one. All I need is to be able to reference a view and use arguments. If not that, then at least a popup with the node teaser.

Thanks!

Comments

rjl’s picture

You are probably doing it right, but you also need to include the api file. The following worked for me to show my node teaser in the popup.

module_load_include('inc', 'popup', 'includes/popup.api');
print popup(array('node' => $data->nid, 'activate' => 'hover', 'ajax' => 1, 'teaser-display' => 1, 'origin'=>'top-right', 'expand'=>'bottom-right', 'width' => 300));
Scheepers de Bruin’s picture

Status: Active » Closed (works as designed)