theme.inc in Views Bootstrap 7.3
Same filename in this branch
- 7.3 templates/accordion/theme.inc
- 7.3 templates/panel/theme.inc
- 7.3 templates/table/theme.inc
- 7.3 templates/tab/theme.inc
- 7.3 templates/dropdown/theme.inc
- 7.3 templates/grid/theme.inc
- 7.3 templates/media/theme.inc
- 7.3 templates/thumbnail/theme.inc
- 7.3 templates/list_group/theme.inc
- 7.3 templates/carousel/theme.inc
Same filename and directory in other branches
Preprocessors and helper functions for thumbnail theming.
File
templates/thumbnail/theme.incView source
<?php
/**
* @file
* Preprocessors and helper functions for thumbnail theming.
*/
/**
* Implementation of template preprocess for the view.
*/
function template_preprocess_views_bootstrap_thumbnail_plugin_style(&$vars) {
_views_bootstrap_preprocess_views_style_plugin_prepare_grid($vars);
}
/**
* Implementation of template preprocess for the view fields.
*/
function template_preprocess_views_bootstrap_thumbnail_plugin_rows(&$vars) {
$view =& $vars['view'];
// Clone value because get_field will unset it.
$row_index = $view->row_index;
foreach ($vars['options'] as $id => $field) {
switch ($id) {
case 'image':
case 'title':
if (isset($view->field[$field])) {
$vars[$id] = $view->style_plugin
->get_field($row_index, $field);
}
break;
case 'content':
$vars[$id] = array();
foreach (array_filter($field) as $content_field) {
if (isset($view->field[$content_field])) {
$vars[$id][$content_field] = $view->style_plugin
->get_field($row_index, $content_field);
}
}
break;
}
}
}
Functions
Name![]() |
Description |
---|---|
template_preprocess_views_bootstrap_thumbnail_plugin_rows | Implementation of template preprocess for the view fields. |
template_preprocess_views_bootstrap_thumbnail_plugin_style | Implementation of template preprocess for the view. |