2 // $Id: search.views_default.inc,v 1.6 2008/06/10 21:30:43 merlinofchaos Exp $
5 * Contains default views on behalf of the search module.
9 * Implementation of hook_default_view_views().
11 function search_views_default_views() {
13 $view->name = 'backlinks';
14 $view->description = 'Displays a list of nodes that link to the node, using the search backlinks table.';
15 $view->tag = 'default';
17 $view->base_table = 'node';
18 $view->is_cacheable = '0';
19 $view->api_version = 2;
20 $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
21 $handler = $view->new_display('default', 'Defaults', 'default');
22 $handler->override_option('fields', array(
28 'relationship' => 'none',
32 $handler->override_option('arguments', array(
35 'table' => 'search_node_links_to',
37 'default_action' => 'not found',
38 'style_plugin' => 'default_summary',
39 'style_options' => array(
42 'items_per_page' => 25,
45 'wildcard_substitution' => '',
46 'title' => 'Pages that link to %1',
47 'default_argument_type' => 'fixed',
48 'default_argument' => '',
49 'validate_type' => 'node',
50 'validate_fail' => 'not found',
51 'relationship' => 'none',
52 'default_argument_fixed' => '',
53 'default_argument_php' => '',
54 'validate_argument_node_type' => array(),
55 'validate_argument_php' => '',
58 $handler->override_option('filters', array(
71 'relationship' => 'none',
74 $handler->override_option('access', array(
79 $handler->override_option('empty', 'No backlinks found.');
80 $handler->override_option('empty_format', '1');
81 $handler->override_option('items_per_page', 30);
82 $handler->override_option('use_pager', '1');
83 $handler->override_option('style_plugin', 'list');
84 $handler->override_option('style_options', array(
87 $handler = $view->new_display('page', 'Page', 'page');
88 $handler->override_option('path', 'node/%/backlinks');
89 $handler->override_option('menu', array(
91 'title' => 'What links here',
94 $handler->override_option('tab_options', array(
99 $handler = $view->new_display('block', 'Block', 'block');
100 $handler->override_option('arguments', array(
103 'table' => 'search_node_links_to',
105 'default_action' => 'default',
106 'style_plugin' => 'default_summary',
107 'style_options' => array(
110 'items_per_page' => 25,
113 'wildcard_substitution' => '',
114 'title' => 'What links here',
115 'default_argument_type' => 'node',
116 'default_argument' => '',
117 'validate_type' => 'node',
118 'validate_fail' => 'not found',
119 'relationship' => 'none',
120 'default_argument_fixed' => '',
121 'default_argument_php' => 'return ($node = menu_get_object()) ? $node->nid : FALSE;',
122 'validate_argument_node_type' => array(
130 'validate_argument_php' => '',
131 'default_argument_user' => 0,
132 'validate_argument_vocabulary' => array(
139 'validate_argument_type' => 'tid',
142 $handler->override_option('items_per_page', 6);
143 $handler->override_option('use_more', 1);
144 $handler->override_option('style_plugin', 'list');
145 $handler->override_option('style_options', array(
148 $handler->override_option('block_description', 'What links here');
149 $views[$view->name] = $view;