element
* @uses $vars['item_class'] Additional CSS class for the
elements
*/
$items = $vars['items'];
if (!is_array($items) || sizeof($items) == 0) {
return true;
}
elgg_push_context('gallery');
$offset = $vars['offset'];
$limit = $vars['limit'];
$count = $vars['count'];
$pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
$gallery_class = 'elgg-gallery';
if (isset($vars['gallery_class'])) {
$gallery_class = "$gallery_class {$vars['gallery_class']}";
}
$item_class = 'elgg-item';
if (isset($vars['item_class'])) {
$item_class = "$item_class {$vars['item_class']}";
}
$nav = '';
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
'count' => $count,
'limit' => $limit,
'offset_key' => $offset_key,
));
}
if ($position == 'before' || $position == 'both') {
echo $nav;
}
?>
getType()}-{$item->getGUID()}";
} else {
$id = "item-{$item->getType()}-{$item->id}";
}
echo "- ";
echo elgg_view_list_item($item, $vars);
echo "
";
}
?>