[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/views/theme/ -> views-view-grid.tpl.php (source)

   1  <?php
   2  // $Id: views-view-grid.tpl.php,v 1.3.4.1 2010/03/12 01:05:46 merlinofchaos Exp $
   3  /**
   4   * @file views-view-grid.tpl.php
   5   * Default simple view template to display a rows in a grid.
   6   *
   7   * - $rows contains a nested array of rows. Each row contains an array of
   8   *   columns.
   9   *
  10   * @ingroup views_templates
  11   */
  12  ?>
  13  <?php if (!empty($title)) : ?>
  14    <h3><?php print $title; ?></h3>
  15  <?php endif; ?>
  16  <table class="views-view-grid">
  17    <tbody>
  18      <?php foreach ($rows as $row_number => $columns): ?>
  19        <?php
  20          $row_class = 'row-' . ($row_number + 1);
  21          if ($row_number == 0) {
  22            $row_class .= ' row-first';
  23          }
  24          if (count($rows) == ($row_number + 1)) {
  25            $row_class .= ' row-last';
  26          }
  27        ?>
  28        <tr class="<?php print $row_class; ?>">
  29          <?php foreach ($columns as $column_number => $item): ?>
  30            <td class="<?php print 'col-'. ($column_number + 1); ?>">
  31              <?php print $item; ?>
  32            </td>
  33          <?php endforeach; ?>
  34        </tr>
  35      <?php endforeach; ?>
  36    </tbody>
  37  </table>


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7