-
-
Save brianberlin/2997297 to your computer and use it in GitHub Desktop.
Drupal grid view template for omega theme.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file views-view-grid.tpl.php | |
* Default simple view template to display a rows in a grid. | |
* | |
* - $rows contains a nested array of rows. Each row contains an array of | |
* columns. | |
* | |
* @ingroup views_templates | |
*/ | |
?> | |
<?php if (!empty($title)) : ?> | |
<h3><?php print $title; ?></h3> | |
<?php endif; ?> | |
<?php foreach ($rows as $columns): ?> | |
<div class="grid-12 alpha omega views-row"> | |
<?php foreach ($columns as $counter => $item): ?> | |
<?php | |
if ($counter == 0) { | |
$alpha_omega = ' alpha'; | |
} | |
elseif (count($columns) == ($counter + 1)) { | |
$alpha_omega = ' omega'; | |
} | |
else { | |
$alpha_omega = ''; | |
} | |
?> | |
<div class="views-column grid-<?php print 12 / count($columns) . $alpha_omega ?>"> | |
<?php print $item; ?> | |
</div> | |
<?php endforeach; ?> | |
</div> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment