function flexslider_views_plugin_style_flexslider::render in Flex Slider 7.2
Same name and namespace in other branches
- 7 flexslider_views/flexslider_views_plugin_style_flexslider.inc \flexslider_views_plugin_style_flexslider::render()
Render the display in this style.
Overrides views_plugin_style::render
File
- flexslider_views/
flexslider_views_plugin_style_flexslider.inc, line 95 - flexslider style plugin for the Views module.
Class
- flexslider_views_plugin_style_flexslider
- Implements a style type plugin for the Views module.
Code
function render() {
// Group the rows according to the grouping field, if specified.
$sets = $this
->render_grouping($this->view->result, $this->options['grouping']);
// Render each group separately and concatenate.
$output = '';
foreach ($sets as $title => $rows) {
// Add caption field if chosen.
if (!empty($this->options['captionfield'])) {
$caption_field = $this->options['captionfield'];
foreach ($rows as $index => $row) {
$rows[$index]->caption = $this->rendered_fields[$index][$caption_field];
}
}
$output .= theme($this
->theme_functions(), array(
'view' => $this->view,
'options' => $this->options,
'rows' => $rows,
'title' => $title,
));
}
return $output;
}