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

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

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


Revision 1.5 - (show annotations) (download) (as text)
Thu May 14 06:28:26 2009 UTC (6 months, 2 weeks ago) by hswong3i
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +14 -19 lines
File MIME type: text/x-php
- sync with 6.x-1.x-dev.
1 <?php
2 // $Id: template.php,v 1.2.2.3 2009/05/11 08:26:46 hswong3i Exp $
3
4 /**
5 * Return a cascade primary links.
6 * Clone implementation from user_block().
7 *
8 * @return
9 * a themed cascade primary links.
10 */
11 function phptemplate_primary() {
12 $output = '<div id="primary-links-region">';
13 $output .= menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
14 $output .= '</div>';
15 return $output;
16 }
17
18 /**
19 * Return a themed mission trail.
20 *
21 * @return
22 * a string containing the mission output, or execute PHP code snippet if
23 * mission is enclosed with <?php ?>.
24 */
25 function phptemplate_mission() {
26 $mission = theme_get_setting('mission');
27 if (preg_match('/^<\?php/', $mission)) {
28 $mission = drupal_eval($mission);
29 }
30 else {
31 $mission = filter_xss_admin($mission);
32 }
33 return isset($mission) ? $mission : '';
34 }
35
36 /**
37 * Return a themed breadcrumb trail.
38 *
39 * @param $breadcrumb
40 * An array containing the breadcrumb links.
41 * @return a string containing the breadcrumb output.
42 */
43 function phptemplate_breadcrumb($breadcrumb) {
44 if (!empty($breadcrumb)) {
45 return '<div class="breadcrumb">'. implode('', $breadcrumb) .'</div>';
46 }
47 }
48
49 /**
50 * Generates IE CSS links for LTR and RTL languages.
51 */
52 function phptemplate_get_ie_styles() {
53 global $language;
54
55 $iecss = '<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . path_to_theme() .'/fix-ie.css" />';
56 if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
57 $iecss .= '<style type="text/css" media="all">@import "'. base_path() . path_to_theme() .'/fix-ie-rtl.css";</style>';
58 }
59
60 return $iecss;
61 }

  ViewVC Help
Powered by ViewVC 1.1.2