function node_views_default_views in Views (for Drupal 7) 5
Same name and namespace in other branches
- 6.3 modules/node.views_default.inc \node_views_default_views()
- 6.2 modules/node.views_default.inc \node_views_default_views()
- 7.3 modules/node.views_default.inc \node_views_default_views()
File
- modules/
views_node.inc, line 337
Code
function node_views_default_views() {
$view = new stdClass();
$view->name = 'frontpage';
$view->description = t('The basic front page view.');
$view->page = true;
$view->url = 'frontpage';
$view->page_title = '';
$view->page_type = 'teaser';
$view->use_pager = true;
$view->nodes_per_page = variable_get('default_nodes_main', 10);
$view->block = false;
$view->menu = false;
$view->breadcrumb_no_home = true;
$view->sort = array(
array(
'tablename' => 'node',
'field' => 'sticky',
'sortorder' => 'DESC',
'options' => '',
),
array(
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => '',
),
);
$view->argument = array(
array(
'type' => 'node_feed',
'argdefault' => '2',
'title' => variable_get('site_name', 'drupal') . ' - ' . variable_get('site_slogan', ''),
'options' => variable_get('site_mission', ''),
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array();
$view->filter = array(
array(
'tablename' => 'node',
'field' => 'promote',
'operator' => '=',
'options' => '',
'value' => '1',
),
array(
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$views[$view->name] = $view;
return $views;
}