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 tab theming.
File
templates/tab/theme.incView source
<?php
/**
* @file
* Preprocessors and helper functions for tab theming.
*/
/**
* Implementation of template preprocess for the view.
*/
function template_preprocess_views_bootstrap_tab_plugin_style(&$vars) {
$view =& $vars['view'];
$tab_field = $vars['options']['tab_field'];
$vars['tab_type'] = $vars['options']['tab_type'];
$vars['tab_position'] = $vars['options']['tab_position'];
$vars['tab_fade'] = $vars['options']['tab_fade'];
// Get tabs.
if (isset($view->field[$tab_field])) {
foreach (array_keys($vars['rows']) as $key) {
$vars['tabs'][$key] = filter_xss($view->style_plugin
->get_field($key, $tab_field), array(
'img',
'br',
'h2',
'h3',
'h4',
'h5',
'h6',
'span',
'strong',
'em',
'i',
'small',
));
}
}
$keys = array_keys($vars['rows']);
$vars['first_key'] = reset($keys);
drupal_add_js(drupal_get_path('module', 'views_bootstrap') . '/js/tabs.js');
drupal_add_css(drupal_get_path('module', 'views_bootstrap') . '/css/tabs.css');
}
Functions
Name![]() |
Description |
---|---|
template_preprocess_views_bootstrap_tab_plugin_style | Implementation of template preprocess for the view. |