/[drupal]/contributions/themes/abessive/template.php
ViewVC logotype

Contents of /contributions/themes/abessive/template.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Mon Feb 16 16:18:13 2009 UTC (9 months, 1 week ago) by njt1982
Branch: MAIN
CVS Tags: DRUPAL-7--1-3, HEAD
Branch point for: DRUPAL-7--1
Changes since 1.1: +4 -11 lines
File MIME type: text/x-php
Updating HEAD for 7.x compatibility
1 <?php
2 // $Id: template.php,v 1.1.2.1 2008/09/05 15:30:24 njt1982 Exp $
3
4 /**
5 * Sets the body-tag class attribute.
6 *
7 * Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
8 */
9 function phptemplate_body_class($sidebar_left, $sidebar_right) {
10 if ($sidebar_left != '' && $sidebar_right != '') {
11 $class = 'sidebars';
12 }
13 else {
14 if ($sidebar_left != '') {
15 $class = 'sidebar-left';
16 }
17 if ($sidebar_right != '') {
18 $class = 'sidebar-right';
19 }
20 }
21
22 if (isset($class)) {
23 print ' class="'. $class .'"';
24 }
25 }
26
27 /**
28 * Return a themed breadcrumb trail.
29 *
30 * @param $breadcrumb
31 * An array containing the breadcrumb links.
32 * @return a string containing the breadcrumb output.
33 */
34
35 function phptemplate_breadcrumb($breadcrumb) {
36 if (!empty($breadcrumb)) {
37 return '<div class="breadcrumb">'. implode('&nbsp;//&nbsp;', $breadcrumb) .'</div>';
38 }
39 }
40
41 /**
42 * Override or insert PHPTemplate variables into the templates.
43 */
44 function _phptemplate_variables($hook, $vars) {
45 if ($hook == 'page') {
46 $vars['footer_message'] = trim($vars['footer_message']);
47 }
48
49 return $vars;
50 }

  ViewVC Help
Powered by ViewVC 1.1.2