/[drupal]/contributions/modules/views/theme/views-view-fields.tpl.php
ViewVC logotype

Contents of /contributions/modules/views/theme/views-view-fields.tpl.php

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


Revision 1.6 - (show annotations) (download) (as text)
Wed Sep 24 22:48:21 2008 UTC (14 months ago) by merlinofchaos
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-RC5, DRUPAL-6--2-0-RC4, DRUPAL-6--2-7, DRUPAL-6--2-6, DRUPAL-6--2-5, DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--2-1, DRUPAL-6--2-0, DRUPAL-6--3-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2, DRUPAL-6--3, DRUPAL-7--3
Changes since 1.5: +6 -2 lines
File MIME type: text/x-php
#298416: Add a mechanism of determining if a field needs SPAN or DIV tags.
1 <?php
2 // $Id: views-view-fields.tpl.php,v 1.5 2008/05/05 23:51:47 merlinofchaos Exp $
3 /**
4 * @file views-view-fields.tpl.php
5 * Default simple view template to all the fields as a row.
6 *
7 * - $view: The view in use.
8 * - $fields: an array of $field objects. Each one contains:
9 * - $field->content: The output of the field.
10 * - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
11 * - $field->class: The safe class id to use.
12 * - $field->handler: The Views field handler object controlling this field. Do not use
13 * var_export to dump this object, as it can't handle the recursion.
14 * - $field->inline: Whether or not the field should be inline.
15 * - $field->inline_html: either div or span based on the above flag.
16 * - $field->separator: an optional separator that may appear before a field.
17 * - $row: The raw result object from the query, with all data it fetched.
18 *
19 * @ingroup views_templates
20 */
21 ?>
22 <?php foreach ($fields as $id => $field): ?>
23 <?php if (!empty($field->separator)): ?>
24 <?php print $field->separator; ?>
25 <?php endif; ?>
26
27 <<?php print $field->inline_html;?> class="views-field-<?php print $field->class; ?>">
28 <?php if ($field->label): ?>
29 <label class="views-label-<?php print $field->class; ?>">
30 <?php print $field->label; ?>:
31 </label>
32 <?php endif; ?>
33 <?php
34 // $field->element_type is either SPAN or DIV depending upon whether or not
35 // the field is a 'block' element type or 'inline' element type.
36 ?>
37 <<?php print $field->element_type; ?> class="field-content"><?php print $field->content; ?></<?php print $field->element_type; ?>>
38 </<?php print $field->inline_html;?>>
39 <?php endforeach; ?>

  ViewVC Help
Powered by ViewVC 1.1.2