You are here

function theme_acquia_lift_variations_list in Acquia Lift Connector 7.2

Theme function to output a list of variations as displays.

Parameters

$variables: array of theme variables including:

  • items: an array of variations to display. Each item in the array will be an array of variations for that display. If there is only one variation set, then there will only be one variation per item key.
1 theme call to theme_acquia_lift_variations_list()
acquia_lift_personalize_campaign_wizard_variations_alter in ./acquia_lift.admin.wizard.inc
Alter hook for the variations portions of the campaign wizard.

File

theme/acquia_lift.wizard.theme.inc, line 163
acquia_lift.wizard.theme.inc Provides theme functions for Acquia Lift's version of the campaign creation wizard workflow.

Code

function theme_acquia_lift_variations_list($variables) {
  $items = $variables['items'];
  $displays = array();
  $max_variations = 0;
  foreach ($items as $variations) {
    $max_variations = max($max_variations, count($variations));
    $displays[] = theme('item_list', array(
      'items' => $variations,
    ));
  }
  $list_classes = array(
    'acquia-lift-variations-list',
  );
  if ($max_variations > 1) {
    $list_classes[] = 'acquia-lift-variations-lockstep';
  }
  return theme('item_list', array(
    'items' => $displays,
    'attributes' => array(
      'class' => $list_classes,
    ),
  ));
}