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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Jun 12 21:53:29 2009 UTC (5 months, 2 weeks ago) by deekayen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +40 -0 lines
File MIME type: text/x-php
move background and link configuration from the mobi_loader module to the theme itself
make the output XHTML mobile 1.2 compliant
1 <?php
2 // $Id: template.php,v 1.1.4.1 2009/06/12 21:45:14 deekayen Exp $
3
4 /**
5 * @return string
6 */
7 function phptemplate_breadcrumb($breadcrumb) {
8 if(sizeof($breadcrumb) > 0) {
9 return implode(' &raquo; ', $breadcrumb);
10 }
11 return '';
12 }
13 /**
14 * Override formatting of primary and secondary links.
15 *
16 * @return string
17 */
18 function phptemplate_links($links) {
19 $output = '';
20
21 if (count($links) > 0) {
22 $num_links = count($links);
23 $i = 1;
24
25 foreach ($links as $link) {
26 $html = isset($link['html']) && $link['html'];
27
28 $link['query'] = isset($link['query']) ? $link['query'] : NULL;
29 $link['fragment'] = isset($link['fragment']) ? $link['fragment'] : NULL;
30
31 if (isset($link['href'])) {
32 $output .= l($link['title'], $link['href'], array(
33 'attributes' => array('accesskey' => $i),
34 'query' => $link['query'],
35 'fragment' => $link['fragment'],
36 'absolute' => FALSE,
37 'html' => $html)
38 );
39 }
40 else if ($link['title']) {
41 if (!$html) {
42 $link['title'] = check_plain($link['title']);
43 }
44 $output .= $link['title'];
45 }
46 $output .= ' | ';
47 $i++;
48 }
49 }
50 return empty($output) ? '' : substr($output, 0, -3);
51 }

  ViewVC Help
Powered by ViewVC 1.1.2