-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathding_tabroll.module
59 lines (55 loc) · 2.01 KB
/
ding_tabroll.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
include_once('ding_tabroll.features.inc');
/**
* Implements hook_theme().
*
* See http://views-help.doc.logrus.com/help/views/api-default-views for help with providing default .tpl files for your views
*/
function ding_tabroll_theme($existing) {
$path = drupal_get_path('module', 'ding_tabroll') . '/templates';
return array(
'views_view_unformatted__tabroll' => array (
'arguments' => array('view' => NULL, 'options' => NULL, 'rows' => NULL, 'title' => NULL),
'template' => 'views-view-unformatted--tabroll',
'original hook' => 'views_view_unformatted',
'path' => $path,
'preprocess functions' => array(
'template_preprocess',
'template_preprocess_views_view_unformatted',
'ding_tabroll_preprocess_views_view_unformatted__tabroll',
),
),
'views_view_fields__tabroll' => array (
'arguments' => array('view' => NULL, 'options' => NULL, 'row' => NULL),
'template' => 'views-view-fields--tabroll',
'original hook' => 'views_view_fields',
'path' => $path,
'preprocess functions' => array(
'template_preprocess',
'template_preprocess_views_view_fields',
'ding_tabroll_preprocess_views_view_fields__tabroll',
),
),
);
}
/**
* Implements hook_init().
*/
function ding_tabroll_init() {
// Add default CSS and JavaScript
drupal_add_js(drupal_get_path('module', 'ding_tabroll') . '/js/ding_tabroll.js');
drupal_add_css(drupal_get_path('module', 'ding_tabroll') . '/css/ding_tabroll.css');
}
/**
* Implements hook_views_post_render().
*/
function ding_tabroll_views_post_render(&$view, &$output, &$cache) {
// HACK / kasperg: Reset the view title. For some reason it is set to "Queue"
// but I cannot determine why/where. As the pre-nodequeue view had no title
// we remove the title by force.
// Site developers may want to set the title for their own views using the
// panel pane which supports title overrride.
if ($view->name == 'tabroll') {
$view->build_info['title'] = '';
}
}