Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.5
Component:
Views Data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 May 2007 at 01:14 UTC
Updated:
19 Sep 2008 at 04:48 UTC
I've created a view that pulls the most recent video node and displays it in a block. This facilitates a "Featured Recent Video" function. It works great, except that I can't set the title of the block to the title of the video node. Or if it's possible, I haven't figured out how to do it.
The closest I got ended up changing the page title, which I want to stay the same. Here's the function from my template.php file:
function phptemplate_views_view_nodes_Featured_Video($view, $nodes, $type, $teasers = false, $links = true) {
// keep old page title
$old_title = drupal_get_title();
foreach ($nodes as $n) {
$node = node_load($n->nid);
$output .= node_view($node, $teasers, true, $links);
}
// reset the title
drupal_set_title($old_title);
return $output;
}
Is there something I can do here to make $node->title available to this block?
Random Note: I'm setting $page to true in node_view because otherwise the video player isn't displayed.
Comments
Comment #1
sunSorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support.