1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Default views used for testing.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_views_default_views().
|
10
|
*/
|
11
|
function ds_test_views_default_views() {
|
12
|
$views = array();
|
13
|
|
14
|
$view = new view;
|
15
|
$view->name = 'ds_testing';
|
16
|
$view->description = '';
|
17
|
$view->tag = 'default';
|
18
|
$view->base_table = 'node';
|
19
|
$view->human_name = 'ds-testing';
|
20
|
$view->core = 7;
|
21
|
$view->api_version = '3.0-alpha1';
|
22
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
23
|
|
24
|
/* Display: Master */
|
25
|
$handler = $view->new_display('default', 'Master', 'default');
|
26
|
$handler->display->display_options['title'] = 'ds-testing';
|
27
|
$handler->display->display_options['access']['type'] = 'perm';
|
28
|
$handler->display->display_options['cache']['type'] = 'none';
|
29
|
$handler->display->display_options['query']['type'] = 'views_query';
|
30
|
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
|
31
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
32
|
$handler->display->display_options['pager']['type'] = 'full';
|
33
|
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
|
34
|
$handler->display->display_options['style_plugin'] = 'default';
|
35
|
$handler->display->display_options['row_plugin'] = 'ds';
|
36
|
/* Field: Content: Title */
|
37
|
$handler->display->display_options['fields']['title']['id'] = 'title';
|
38
|
$handler->display->display_options['fields']['title']['table'] = 'node';
|
39
|
$handler->display->display_options['fields']['title']['field'] = 'title';
|
40
|
$handler->display->display_options['fields']['title']['label'] = '';
|
41
|
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
|
42
|
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
|
43
|
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
|
44
|
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
|
45
|
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
|
46
|
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
|
47
|
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
|
48
|
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
|
49
|
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
|
50
|
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
|
51
|
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
|
52
|
/* Sort criterion: Content: Post date */
|
53
|
$handler->display->display_options['sorts']['created']['id'] = 'created';
|
54
|
$handler->display->display_options['sorts']['created']['table'] = 'node';
|
55
|
$handler->display->display_options['sorts']['created']['field'] = 'created';
|
56
|
/* Sort criterion: Content: Tags (field_tags) */
|
57
|
$handler->display->display_options['sorts']['field_tags_tid']['id'] = 'field_tags_tid';
|
58
|
$handler->display->display_options['sorts']['field_tags_tid']['table'] = 'field_data_field_tags';
|
59
|
$handler->display->display_options['sorts']['field_tags_tid']['field'] = 'field_tags_tid';
|
60
|
/* Filter criterion: Content: Published */
|
61
|
$handler->display->display_options['filters']['status']['id'] = 'status';
|
62
|
$handler->display->display_options['filters']['status']['table'] = 'node';
|
63
|
$handler->display->display_options['filters']['status']['field'] = 'status';
|
64
|
$handler->display->display_options['filters']['status']['value'] = 1;
|
65
|
$handler->display->display_options['filters']['status']['group'] = 0;
|
66
|
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
|
67
|
/* Filter criterion: Content: Type */
|
68
|
$handler->display->display_options['filters']['type']['id'] = 'type';
|
69
|
$handler->display->display_options['filters']['type']['table'] = 'node';
|
70
|
$handler->display->display_options['filters']['type']['field'] = 'type';
|
71
|
$handler->display->display_options['filters']['type']['value'] = array(
|
72
|
'article' => 'article',
|
73
|
);
|
74
|
|
75
|
/* Display: Page */
|
76
|
$handler = $view->new_display('page', 'Page', 'page');
|
77
|
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
|
78
|
$handler->display->display_options['style_plugin'] = 'default';
|
79
|
$handler->display->display_options['defaults']['style_options'] = FALSE;
|
80
|
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
|
81
|
$handler->display->display_options['row_plugin'] = 'ds';
|
82
|
$handler->display->display_options['row_options']['alternating'] = 0;
|
83
|
$handler->display->display_options['row_options']['grouping'] = 0;
|
84
|
$handler->display->display_options['row_options']['advanced'] = 0;
|
85
|
$handler->display->display_options['row_options']['grouping_fieldset'] = array(
|
86
|
'grouping' => 0,
|
87
|
'group_field' => 'node_created',
|
88
|
'group_field_function' => '',
|
89
|
);
|
90
|
$handler->display->display_options['row_options']['default_fieldset'] = array(
|
91
|
'view_mode' => 'teaser',
|
92
|
'load_comments' => 0,
|
93
|
);
|
94
|
$handler->display->display_options['row_options']['alternating_fieldset'] = array(
|
95
|
'alternating' => 0,
|
96
|
'allpages' => 0,
|
97
|
'item_0' => 'teaser',
|
98
|
'item_1' => 'teaser',
|
99
|
'item_2' => 'teaser',
|
100
|
'item_3' => 'teaser',
|
101
|
'item_4' => 'teaser',
|
102
|
'item_5' => 'teaser',
|
103
|
'item_6' => 'teaser',
|
104
|
'item_7' => 'teaser',
|
105
|
'item_8' => 'teaser',
|
106
|
'item_9' => 'teaser',
|
107
|
);
|
108
|
$handler->display->display_options['row_options']['advanced_fieldset'] = array(
|
109
|
'advanced' => 0,
|
110
|
);
|
111
|
$handler->display->display_options['defaults']['row_options'] = FALSE;
|
112
|
$handler->display->display_options['path'] = 'ds-testing';
|
113
|
|
114
|
/* Display: Page 1 */
|
115
|
$handler = $view->new_display('page', 'Page 1', 'page_1');
|
116
|
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
|
117
|
$handler->display->display_options['style_plugin'] = 'default';
|
118
|
$handler->display->display_options['defaults']['style_options'] = FALSE;
|
119
|
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
|
120
|
$handler->display->display_options['row_plugin'] = 'ds';
|
121
|
$handler->display->display_options['row_options']['alternating'] = 1;
|
122
|
$handler->display->display_options['row_options']['grouping'] = 0;
|
123
|
$handler->display->display_options['row_options']['advanced'] = 0;
|
124
|
$handler->display->display_options['row_options']['grouping_fieldset'] = array(
|
125
|
'grouping' => 0,
|
126
|
'group_field' => 'node_created',
|
127
|
'group_field_function' => '',
|
128
|
);
|
129
|
$handler->display->display_options['row_options']['default_fieldset'] = array(
|
130
|
'view_mode' => 'teaser',
|
131
|
'load_comments' => 0,
|
132
|
);
|
133
|
$handler->display->display_options['row_options']['alternating_fieldset'] = array(
|
134
|
'alternating' => 1,
|
135
|
'allpages' => 0,
|
136
|
'item_0' => 'full',
|
137
|
'item_1' => 'teaser',
|
138
|
'item_2' => 'teaser',
|
139
|
'item_3' => 'teaser',
|
140
|
'item_4' => 'teaser',
|
141
|
'item_5' => 'teaser',
|
142
|
'item_6' => 'teaser',
|
143
|
'item_7' => 'teaser',
|
144
|
'item_8' => 'teaser',
|
145
|
'item_9' => 'teaser',
|
146
|
);
|
147
|
$handler->display->display_options['row_options']['advanced_fieldset'] = array(
|
148
|
'advanced' => 0,
|
149
|
);
|
150
|
$handler->display->display_options['defaults']['row_options'] = FALSE;
|
151
|
$handler->display->display_options['path'] = 'ds-testing-2';
|
152
|
|
153
|
/* Display: Page 2 */
|
154
|
$handler = $view->new_display('page', 'Page 2', 'page_2');
|
155
|
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
|
156
|
$handler->display->display_options['style_plugin'] = 'default';
|
157
|
$handler->display->display_options['defaults']['style_options'] = FALSE;
|
158
|
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
|
159
|
$handler->display->display_options['row_plugin'] = 'ds';
|
160
|
$handler->display->display_options['row_options']['alternating'] = 0;
|
161
|
$handler->display->display_options['row_options']['grouping'] = 1;
|
162
|
$handler->display->display_options['row_options']['advanced'] = 0;
|
163
|
$handler->display->display_options['row_options']['grouping_fieldset'] = array(
|
164
|
'grouping' => 1,
|
165
|
'group_field' => 'field_data_field_tags_field_tags_tid',
|
166
|
'group_field_function' => '',
|
167
|
);
|
168
|
$handler->display->display_options['row_options']['default_fieldset'] = array(
|
169
|
'view_mode' => 'teaser',
|
170
|
'load_comments' => 0,
|
171
|
);
|
172
|
$handler->display->display_options['row_options']['alternating_fieldset'] = array(
|
173
|
'alternating' => 0,
|
174
|
'allpages' => 0,
|
175
|
'item_0' => 'teaser',
|
176
|
'item_1' => 'teaser',
|
177
|
'item_2' => 'teaser',
|
178
|
'item_3' => 'teaser',
|
179
|
'item_4' => 'teaser',
|
180
|
'item_5' => 'teaser',
|
181
|
'item_6' => 'teaser',
|
182
|
'item_7' => 'teaser',
|
183
|
'item_8' => 'teaser',
|
184
|
'item_9' => 'teaser',
|
185
|
);
|
186
|
$handler->display->display_options['row_options']['advanced_fieldset'] = array(
|
187
|
'advanced' => 0,
|
188
|
);
|
189
|
$handler->display->display_options['defaults']['row_options'] = FALSE;
|
190
|
$handler->display->display_options['defaults']['sorts'] = FALSE;
|
191
|
/* Sort criterion: Content: Tags (field_tags) */
|
192
|
$handler->display->display_options['sorts']['field_tags_tid']['id'] = 'field_tags_tid';
|
193
|
$handler->display->display_options['sorts']['field_tags_tid']['table'] = 'field_data_field_tags';
|
194
|
$handler->display->display_options['sorts']['field_tags_tid']['field'] = 'field_tags_tid';
|
195
|
$handler->display->display_options['path'] = 'ds-testing-3';
|
196
|
|
197
|
/* Display: Page 3 */
|
198
|
$handler = $view->new_display('page', 'Page 3', 'page_3');
|
199
|
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
|
200
|
$handler->display->display_options['style_plugin'] = 'default';
|
201
|
$handler->display->display_options['defaults']['style_options'] = FALSE;
|
202
|
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
|
203
|
$handler->display->display_options['row_plugin'] = 'ds';
|
204
|
$handler->display->display_options['row_options']['alternating'] = 0;
|
205
|
$handler->display->display_options['row_options']['grouping'] = 1;
|
206
|
$handler->display->display_options['row_options']['advanced'] = 0;
|
207
|
$handler->display->display_options['row_options']['grouping_fieldset'] = array(
|
208
|
'grouping' => 1,
|
209
|
'group_field' => 'field_data_field_tags_field_tags_tid',
|
210
|
'group_field_function' => 'ds_test_get_tag_name',
|
211
|
);
|
212
|
$handler->display->display_options['row_options']['default_fieldset'] = array(
|
213
|
'view_mode' => 'teaser',
|
214
|
'load_comments' => 0,
|
215
|
);
|
216
|
$handler->display->display_options['row_options']['alternating_fieldset'] = array(
|
217
|
'alternating' => 0,
|
218
|
'allpages' => 0,
|
219
|
'item_0' => 'teaser',
|
220
|
'item_1' => 'teaser',
|
221
|
'item_2' => 'teaser',
|
222
|
'item_3' => 'teaser',
|
223
|
'item_4' => 'teaser',
|
224
|
'item_5' => 'teaser',
|
225
|
'item_6' => 'teaser',
|
226
|
'item_7' => 'teaser',
|
227
|
'item_8' => 'teaser',
|
228
|
'item_9' => 'teaser',
|
229
|
);
|
230
|
$handler->display->display_options['row_options']['advanced_fieldset'] = array(
|
231
|
'advanced' => 0,
|
232
|
);
|
233
|
$handler->display->display_options['defaults']['row_options'] = FALSE;
|
234
|
$handler->display->display_options['defaults']['sorts'] = FALSE;
|
235
|
/* Sort criterion: Content: Tags (field_tags) */
|
236
|
$handler->display->display_options['sorts']['field_tags_tid']['id'] = 'field_tags_tid';
|
237
|
$handler->display->display_options['sorts']['field_tags_tid']['table'] = 'field_data_field_tags';
|
238
|
$handler->display->display_options['sorts']['field_tags_tid']['field'] = 'field_tags_tid';
|
239
|
$handler->display->display_options['path'] = 'ds-testing-4';
|
240
|
|
241
|
/* Display: Page 4 */
|
242
|
$handler = $view->new_display('page', 'Page 4', 'page_4');
|
243
|
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
|
244
|
$handler->display->display_options['style_plugin'] = 'default';
|
245
|
$handler->display->display_options['defaults']['style_options'] = FALSE;
|
246
|
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
|
247
|
$handler->display->display_options['row_plugin'] = 'ds';
|
248
|
$handler->display->display_options['row_options']['alternating'] = 0;
|
249
|
$handler->display->display_options['row_options']['grouping'] = 0;
|
250
|
$handler->display->display_options['row_options']['advanced'] = 1;
|
251
|
$handler->display->display_options['row_options']['grouping_fieldset'] = array(
|
252
|
'grouping' => 0,
|
253
|
'group_field' => 'field_data_field_tags_field_tags_tid',
|
254
|
'group_field_function' => '',
|
255
|
);
|
256
|
$handler->display->display_options['row_options']['default_fieldset'] = array(
|
257
|
'view_mode' => 'teaser',
|
258
|
'load_comments' => 0,
|
259
|
);
|
260
|
$handler->display->display_options['row_options']['alternating_fieldset'] = array(
|
261
|
'alternating' => 0,
|
262
|
'allpages' => 0,
|
263
|
'item_0' => 'teaser',
|
264
|
'item_1' => 'teaser',
|
265
|
'item_2' => 'teaser',
|
266
|
'item_3' => 'teaser',
|
267
|
'item_4' => 'teaser',
|
268
|
'item_5' => 'teaser',
|
269
|
'item_6' => 'teaser',
|
270
|
'item_7' => 'teaser',
|
271
|
'item_8' => 'teaser',
|
272
|
'item_9' => 'teaser',
|
273
|
);
|
274
|
$handler->display->display_options['row_options']['advanced_fieldset'] = array(
|
275
|
'advanced' => 1,
|
276
|
);
|
277
|
$handler->display->display_options['defaults']['row_options'] = FALSE;
|
278
|
$handler->display->display_options['path'] = 'ds-testing-5';
|
279
|
|
280
|
/* Display: Page 5 */
|
281
|
$handler = $view->new_display('page', 'Page 5', 'page_5');
|
282
|
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
|
283
|
$handler->display->display_options['style_plugin'] = 'default';
|
284
|
$handler->display->display_options['defaults']['style_options'] = FALSE;
|
285
|
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
|
286
|
$handler->display->display_options['row_plugin'] = 'ds';
|
287
|
$handler->display->display_options['row_options']['alternating'] = 0;
|
288
|
$handler->display->display_options['row_options']['grouping'] = 0;
|
289
|
$handler->display->display_options['row_options']['advanced'] = 0;
|
290
|
$handler->display->display_options['row_options']['grouping_fieldset'] = array(
|
291
|
'grouping' => 0,
|
292
|
'group_field' => 'field_data_field_tags_field_tags_tid',
|
293
|
'group_field_function' => '',
|
294
|
);
|
295
|
$handler->display->display_options['row_options']['default_fieldset'] = array(
|
296
|
'view_mode' => 'teaser',
|
297
|
'load_comments' => 0,
|
298
|
);
|
299
|
$handler->display->display_options['row_options']['alternating_fieldset'] = array(
|
300
|
'alternating' => 0,
|
301
|
'allpages' => 0,
|
302
|
'item_0' => 'teaser',
|
303
|
'item_1' => 'teaser',
|
304
|
'item_2' => 'teaser',
|
305
|
'item_3' => 'teaser',
|
306
|
'item_4' => 'teaser',
|
307
|
'item_5' => 'teaser',
|
308
|
'item_6' => 'teaser',
|
309
|
'item_7' => 'teaser',
|
310
|
'item_8' => 'teaser',
|
311
|
'item_9' => 'teaser',
|
312
|
);
|
313
|
$handler->display->display_options['row_options']['advanced_fieldset'] = array(
|
314
|
'advanced' => 0,
|
315
|
);
|
316
|
$handler->display->display_options['defaults']['row_options'] = FALSE;
|
317
|
$handler->display->display_options['defaults']['header'] = FALSE;
|
318
|
/* Header: Global: Text area */
|
319
|
$handler->display->display_options['header']['area']['id'] = 'area';
|
320
|
$handler->display->display_options['header']['area']['table'] = 'views';
|
321
|
$handler->display->display_options['header']['area']['field'] = 'area';
|
322
|
$handler->display->display_options['header']['area']['empty'] = FALSE;
|
323
|
$handler->display->display_options['header']['area']['content'] = 'Header text';
|
324
|
$handler->display->display_options['header']['area']['format'] = 'filtered_html';
|
325
|
$handler->display->display_options['header']['area']['tokenize'] = 0;
|
326
|
$handler->display->display_options['defaults']['footer'] = FALSE;
|
327
|
/* Footer: Global: Text area */
|
328
|
$handler->display->display_options['footer']['area']['id'] = 'area';
|
329
|
$handler->display->display_options['footer']['area']['table'] = 'views';
|
330
|
$handler->display->display_options['footer']['area']['field'] = 'area';
|
331
|
$handler->display->display_options['footer']['area']['empty'] = FALSE;
|
332
|
$handler->display->display_options['footer']['area']['content'] = 'Footer text';
|
333
|
$handler->display->display_options['footer']['area']['format'] = 'filtered_html';
|
334
|
$handler->display->display_options['footer']['area']['tokenize'] = 0;
|
335
|
$handler->display->display_options['defaults']['filters'] = FALSE;
|
336
|
/* Filter criterion: Content: Published */
|
337
|
$handler->display->display_options['filters']['status']['id'] = 'status';
|
338
|
$handler->display->display_options['filters']['status']['table'] = 'node';
|
339
|
$handler->display->display_options['filters']['status']['field'] = 'status';
|
340
|
$handler->display->display_options['filters']['status']['value'] = '1';
|
341
|
$handler->display->display_options['filters']['status']['group'] = 0;
|
342
|
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
|
343
|
/* Filter criterion: Content: Type */
|
344
|
$handler->display->display_options['filters']['type']['id'] = 'type';
|
345
|
$handler->display->display_options['filters']['type']['table'] = 'node';
|
346
|
$handler->display->display_options['filters']['type']['field'] = 'type';
|
347
|
$handler->display->display_options['filters']['type']['value'] = array(
|
348
|
'article' => 'article',
|
349
|
'page' => 'page',
|
350
|
);
|
351
|
$handler->display->display_options['filters']['type']['exposed'] = TRUE;
|
352
|
$handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
|
353
|
$handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
|
354
|
$handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
|
355
|
$handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
|
356
|
$handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
|
357
|
$handler->display->display_options['path'] = 'ds-testing-6';
|
358
|
$views['ds_testing'] = $view;
|
359
|
|
360
|
return $views;
|
361
|
}
|