function theme_rotor_block in Rotor Banner 5
Same name and namespace in other branches
- 5.7 rotor.module \theme_rotor_block()
- 6 rotor.module \theme_rotor_block()
Theme function for the block
Parameters
array $items The list of nodes to present in the block.:
1 call to theme_rotor_block()
- theme_rotor_gallery_view in ./
views.inc - Display the nodes of a view as an image gallery.
1 theme call to theme_rotor_block()
- rotor_block_content in ./
rotor.module - Returns the block content.
File
- ./
rotor.module, line 544 - A rotor banner consists in a set of images that will be changing. This module is made using jquery.
Code
function theme_rotor_block($items = array()) {
if (count($items) == 0) {
return '';
}
// Setting the image height and width
$css_width = variable_get('rotor_width', 200) . 'px';
$css_height = variable_get('rotor_height', 200) . 'px';
// Print the Rotor items.
$output = "<div class='rotor' style=\"width:{$css_width};\">\n";
if (variable_get('rotor_group_tabs', ROTOR_GROUP_TABS) == ROTOR_GROUP_TABS) {
$output .= theme('rotor_tabs', $items);
}
$output .= theme('rotor_items', $items);
$output .= '</div>';
return $output;
}