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

Diff of /contributions/themes/wabi/template.php

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

revision 1.1, Thu Apr 24 11:45:24 2008 UTC revision 1.2, Thu Apr 24 12:58:59 2008 UTC
# Line 67  function wabi_validate_page_width($width Line 67  function wabi_validate_page_width($width
67  /**  /**
68   * Override or insert PHPTemplate variables into the templates.   * Override or insert PHPTemplate variables into the templates.
69   */   */
70  function _phptemplate_variables($hook, $vars)  function phptemplate_preprocess_page(&$vars) {
71  {    // Hook into color.module
72    if ($hook == 'page') {    if (module_exists('color')) {
73        _color_page_alter($vars);
     // Hook into color.module  
     if (module_exists('color')) {  
       _color_page_alter($vars);  
     }  
     return $vars;  
74    }    }
   return array();  
 }  
   
 function phptemplate_field(&$node, &$field, &$items, $teaser, $page) {  
   $field_empty = TRUE;  
   foreach ($items as $delta => $item) {  
     if (!empty($item['view']) || $item['view'] === "0") {  
       $field_empty = FALSE;  
       break;  
     }  
   }  
   
   $variables = array(  
     'node' => $node,  
     'field' => $field,  
     'field_type' => $field['type'],  
     'field_name' => $field['field_name'],  
     'field_type_css' => strtr($field['type'], '_', '-'),  
     'field_name_css' => strtr($field['field_name'], '_', '-'),  
     'label' => t($field['widget']['label']),  
   'label_display' => 'hidden',  
 //    'label_display' => isset($field['display_settings']['label']['format']) ? $field['display_settings']['label']['format'] : 'above',  
     'field_empty' => $field_empty,  
     'items' => $items,  
     'teaser' => $teaser,  
     'page' => $page,  
   );  
   
   return _phptemplate_callback('field', $variables, array('field-'. $field['field_name']));  
   
75  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2