-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.php
More file actions
49 lines (42 loc) · 1.54 KB
/
template.php
File metadata and controls
49 lines (42 loc) · 1.54 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
<?php
function voltron_preprocess_html(&$variables) {
//drupal_add_css('http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.no-icons.min.css', array('type' => 'external'));
drupal_add_css('//netdna.bootstrapcdn.com/bootswatch/2.1.0/spacelab/bootstrap.no-icons.min.css', array('type' => 'external'));
drupal_add_css('//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css', array('type' => 'external'));
drupal_add_js('//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/js/bootstrap.min.js','external');
}
/**
* Custom theme function for the login/register link.
*/
function voltron_lt_login_link($variables) {
// Only display register text if registration is allowed.
if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
return t('Sign In');
}
else {
return t('Log in');
}
}
/**
* Implementation of preprocess_page().
*/
function voltron_preprocess_page(&$vars) {
$attr = array();
// Replace screen/all stylesheets with print
// We want a minimal print representation here for full control.
if (isset($_GET['print'])) {
$css = drupal_add_css();
unset($css['all']);
unset($css['screen']);
$css['all'] = $css['print'];
$vars['styles'] = drupal_get_css($css);
// Add print header
$vars['print_header'] = theme('print_header');
// Replace all body classes
$attr['class'] = 'print';
// Use print template
$vars['template_file'] = 'templates/print-page';
// Suppress devel output
$GLOBALS['devel_shutdown'] = FALSE;
}
}