Created
September 30, 2010 22:03
grid style Drupal view, but use 960.gs instead of tables.
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"> | |
<?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="grid-3<?php print $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
Uses a container of 12-grid-units, with rows of four items. Resulting in each grid-item being 3 units wide.
Could be recalculated with any amount. But make sure to have the settings in views resemble your amounts in here.