You are here

function theme_rotor_block in Rotor Banner 6

Same name and namespace in other branches
  1. 5.7 rotor.module \theme_rotor_block()
  2. 5 rotor.module \theme_rotor_block()

Theme function for the block

Parameters

array $items The list of nodes to present in the block.:

1 theme call to theme_rotor_block()
rotor_block_content in ./rotor.module
Returns the block content.

File

./rotor.module, line 536
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 && variable_get('rotor_tab_position', ROTOR_TAB_POSITION_TOP) == ROTOR_TAB_POSITION_TOP) {
    $output .= theme('rotor_tabs', $items);
  }
  $output .= theme('rotor_items', $items);
  if (variable_get('rotor_group_tabs', ROTOR_GROUP_TABS) == ROTOR_GROUP_TABS && variable_get('rotor_tab_position', ROTOR_TAB_POSITION_TOP) == ROTOR_TAB_POSITION_BOTTOM) {
    $output .= theme('rotor_tabs', $items);
  }
  $output .= '</div>';
  return $output;
}