-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpsu_header.module
More file actions
53 lines (47 loc) · 1.12 KB
/
psu_header.module
File metadata and controls
53 lines (47 loc) · 1.12 KB
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
<?php
/**
* Impliments hook_theme().
*/
function psu_header_theme($existing, $type, $theme, $path) {
return array(
'psu_header' => array(
'variables' => array('tier2_name' => NULL),
'template' => 'psu-header',
),
'psu_header_menu' => array(
'variables' => array('menu' => NULL),
'template' => 'psu-header_menu',
),
);
}
/**
* Impliments hook_block_info().
*/
function psu_header_block_info() {
// This example comes from node.module.
$blocks['psu_header'] = array(
'info' => t('PSU Header'),
);
return $blocks;
}
/**
* Impliments hook_block_view().
*/
function psu_header_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'psu_header':
$block['content'] = array(
'#markup' => theme('psu_header'),
'#attached' => array('css' => array(drupal_get_path('module', 'psu_header').'/css/psu-header.css')),
);
break;
}
return $block;
}
/**
* Impliments hook_preprocess_psu_header().
*/
function psu_header_preprocess_psu_header(&$variables) {
$variables['tier2_name'] = 'Center for Excellence in Science Education';
}