function theme_views_slideshow_thumbnailhover_breakout_teasers in Views Slideshow 6.2
Views Slideshow: pager in the form of node teasers.
1 theme call to theme_views_slideshow_thumbnailhover_breakout_teasers()
- template_preprocess_views_slideshow_thumbnailhover in contrib/
views_slideshow_thumbnailhover/ views_slideshow_thumbnailhover.theme.inc - Implements template_preprocess_hook_THEMENAME().
File
- contrib/
views_slideshow_thumbnailhover/ views_slideshow_thumbnailhover.theme.inc, line 191 - Theme & preprocess functions for the Views Slideshow: ThumbnailHover module.
Code
function theme_views_slideshow_thumbnailhover_breakout_teasers($view, $items, $vss_id, $options) {
$attributes['id'] = "views_slideshow_thumbnailhover_breakout_teasers_" . $vss_id;
$attributes['class'] = 'views_slideshow_thumbnailhover_breakout_teasers clear-block';
$attributes = drupal_attributes($attributes);
$output = "<div{$attributes}>";
if ('title' == $options['views_slideshow_thumbnailhover']['hover_breakout']) {
foreach ($view->result as $count => $node) {
$node = node_load($node->nid);
// TODO, this loads too much, but on node row we dont access the fields separately.
$output .= theme('views_slideshow_thumbnailhover_breakout_teaser', $node->title, $vss_id, $count, count($items));
}
}
elseif ($view->display_handler
->uses_fields()) {
foreach ($view->result as $count => $node) {
$rendered_fields = '';
foreach ($options['views_slideshow_thumbnailhover']['breakout_fields'] as $field => $use) {
if ($use !== 0 && is_object($view->field[$field]) && !$view->field[$field]->options['exclude']) {
$rendered_fields .= '<div class="views-field-' . views_css_safe($view->field[$field]->field) . '">';
if ($view->field[$field]
->label()) {
$rendered_fields .= '<label class="view-label-' . views_css_safe($view->field[$field]->field) . '">';
$rendered_fields .= $view->field[$field]
->label() . ':';
$rendered_fields .= '</label>';
}
$rendered_fields .= '<div class="views-content-' . views_css_safe($view->field[$field]->field) . '">';
$rendered_fields .= $view->style_plugin->rendered_fields[$count][$field];
$rendered_fields .= '</div>';
$rendered_fields .= '</div>';
}
}
$output .= theme('views_slideshow_thumbnailhover_breakout_teaser', $rendered_fields, $vss_id, $count, count($items));
}
}
else {
foreach ($items as $count => $item) {
$output .= theme('views_slideshow_thumbnailhover_breakout_teaser', $item, $vss_id, $count, count($items));
}
}
$output .= "</div>\n";
return $output;
}