/[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.1.2.1, Sat Sep 6 22:06:40 2008 UTC
# Line 79  function _phptemplate_variables($hook, $ Line 79  function _phptemplate_variables($hook, $
79    }    }
80    return array();    return array();
81  }  }
   
 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']));  
   
 }  

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

  ViewVC Help
Powered by ViewVC 1.1.2