Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Views Data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2008 at 17:23 UTC
Updated:
1 Jul 2008 at 17:37 UTC
I'm attempting to add the following within a file named block-views-Description.tpl.php insider my theme directory. It is overwriting the blocks output, but when I attempt to use <?php print $node->content['body']['#value'] ?> nothing displays.
The view is as follows:
$view = new stdClass();
$view->name = 'Description';
$view->description = '';
$view->access = array (
);
$view->view_args_php = 'if (arg(0) == \'node\' && is_numeric(arg(1))) {
$args[0] = arg(1);
}
return $args; ';
$view->page = FALSE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'node';
$view->url = '';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->block = TRUE;
$view->block_title = 'Description';
$view->block_header = '<a href="#">View Size Chart</a>';
$view->block_header_format = '1';
$view->block_footer = '';
$view->block_footer_format = '1';
$view->block_empty = '';
$view->block_empty_format = '1';
$view->block_type = 'node';
$view->nodes_per_block = '1';
$view->block_more = FALSE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
);
$view->argument = array (
array (
'type' => 'nid',
'argdefault' => '7',
'title' => '',
'options' => '0',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'product',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;This is a similar issue, http://drupal.org/node/262239
Comments
Comment #1
merlinofchaos commentedThat's a core block template and not a views template. Even though you might have a view in the template, you won't have access to your view there; only Views output.