| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @file views-view-table.tpl.php 4 * Template to display a view as a table. 5 * 6 * - $title : The title of this group of rows. May be empty. 7 * - $header: An array of header labels keyed by field id. 8 * - $fields: An array of CSS IDs to use for each field id. 9 * - $class: A class or classes to apply to the table, based on settings. 10 * - $row_classes: An array of classes to apply to each row, indexed by row 11 * number. This matches the index in $rows. 12 * - $rows: An array of row items. Each row is an array of content. 13 * $rows are keyed by row number, fields within rows are keyed by field ID. 14 * @ingroup views_templates 15 */ 16 ?> 17 <table class="<?php print $class; ?>"<?php print $attributes; ?>> 18 <?php if (!empty($title)) : ?> 19 <caption><?php print $title; ?></caption> 20 <?php endif; ?> 21 <thead> 22 <tr> 23 <?php foreach ($header as $field => $label): ?> 24 <th class="views-field views-field-<?php print $fields[$field]; ?>"> 25 <?php print $label; ?> 26 </th> 27 <?php endforeach; ?> 28 </tr> 29 </thead> 30 <tbody> 31 <?php foreach ($rows as $count => $row): ?> 32 <tr class="<?php print implode(' ', $row_classes[$count]); ?>"> 33 <?php foreach ($row as $field => $content): ?> 34 <td class="views-field views-field-<?php print $fields[$field]; ?>"> 35 <?php print $content; ?> 36 </td> 37 <?php endforeach; ?> 38 </tr> 39 <?php endforeach; ?> 40 </tbody> 41 </table>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |