views-bootstrap-thumbnail-plugin-style.tpl.php in Views Bootstrap 7.3
Same filename and directory in other branches
views-bootstrap-thumbnail-plugin-style.tpl.php
Default simple view template to display Bootstrap Thumbnails.
- $rows contains a nested array of rows. Each row contains an array of columns.
- $column_type contains a number (default Bootstrap grid system column type).
- $class_prefix defines the default prefix to use for column classes.
File
templates/thumbnail/views-bootstrap-thumbnail-plugin-style.tpl.phpView source
<?php
/**
* @file
* views-bootstrap-thumbnail-plugin-style.tpl.php
*
* Default simple view template to display Bootstrap Thumbnails.
*
* - $rows contains a nested array of rows. Each row contains an array of
* columns.
* - $column_type contains a number (default Bootstrap grid system column type).
* - $class_prefix defines the default prefix to use for column classes.
*
* @ingroup views_templates
*/
?>
<?php
if (!empty($title)) {
?>
<h3><?php
print $title;
?></h3>
<?php
}
?>
<div id="views-bootstrap-thumbnail-<?php
print $id;
?>" class="<?php
print $classes;
?>">
<?php
if ($options['alignment'] == 'horizontal') {
?>
<?php
foreach ($items as $row) {
?>
<div class="row">
<?php
foreach ($row['content'] as $key => $column) {
?>
<div class="<?php
print $col_classes;
?>">
<div class="thumbnail">
<?php
print $column['content'];
?>
</div>
</div>
<?php
/* Add clearfix divs if required */
?>
<?php
if ($options['columns_horizontal'] == -1 && !empty($options['clear_columns']) && $key != 0) {
?>
<?php
foreach ($clearfix as $screen => $count) {
?>
<?php
if (($key + 1) % $count == 0) {
?>
<div class="clearfix visible-<?php
print $screen;
?>-block"></div>
<?php
}
?>
<?php
}
?>
<?php
}
?>
<?php
}
?>
</div>
<?php
}
?>
<?php
}
else {
?>
<div class="row">
<?php
foreach ($items as $column) {
?>
<div class="<?php
print $col_classes;
?>">
<?php
foreach ($column['content'] as $row) {
?>
<div class="thumbnail">
<?php
print $row['content'];
?>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>