-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.php
47 lines (39 loc) · 1.1 KB
/
template.php
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
<?php
/**
*
* @mainpage ThinkDrop Sled
*
* The main theme for thinkdrop.net in 2011Q1
*/
/**
* Override or insert variables into the block templates.
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("block" in this case.)
*/
function slope_preprocess_block(&$vars, $hook) {
// Special classes for blocks.
$vars['title_attributes_array']['class'][] = 'block-title';
}
function slope_preprocess_page(&$vars, $hook) {
//Give main menu links classes and a span.
foreach ($vars['main_menu'] as &$link){
$link['attributes']['class'][] = drupal_html_class($link['title']);
$link['html'] = TRUE;
$link['title'] = '<span>' . $link['title'] . '</span>';
}
$vars['nav'] = theme('links__system_main_menu', array(
'links' => $vars['main_menu'],
'attributes' => array(
'id' => 'main-menu-links',
'class' => array('links', 'clearfix'),
),
'heading' => array(
'text' => t('Main menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
));
}