Elgg  Version 2.3
Variables
gallery.php File Reference

Go to the source code of this file.

Variables

 $items = $vars['items']
 Gallery view. More...
 
 $count = elgg_extract('count', $vars)
 
 $pagination = elgg_extract('pagination', $vars, true)
 
 $position = elgg_extract('position', $vars, 'after')
 
 $no_results = elgg_extract('no_results', $vars, '')
 
 $list_classes = ['elgg-gallery']
 
if(isset($vars['gallery_class'])) $item_classes = ['elgg-item']
 
if(isset($vars['item_class'])) $nav = ($pagination) ? elgg_view('navigation/pagination', $vars) : ''
 
 $index = 0
 
 $list_items = ''
 
foreach($items as $item) if($position=='before'|| $position=='both') if(empty($list_items) && $no_results) else
 

Variable Documentation

◆ $count

$count = elgg_extract('count', $vars)

Definition at line 21 of file gallery.php.

◆ $index

$index = 0

Definition at line 49 of file gallery.php.

◆ $item_classes

if (isset( $vars[ 'gallery_class'])) $item_classes = ['elgg-item']

Definition at line 42 of file gallery.php.

◆ $items

$items = $vars['items']

Gallery view.

Implemented as an unorder list

@uses $vars['items'] Array of ElggEntity, ElggAnnotation or ElggRiverItem objects @uses $vars['offset'] Index of the first list item in complete list @uses $vars['limit'] Number of items per page @uses $vars['count'] Number of items in the complete list @uses $vars['pagination'] Show pagination? (default: true) @uses $vars['position'] Position of the pagination: before, after, or both @uses $vars['full_view'] Show the full view of the items (default: false) @uses $vars['gallery_class'] Additional CSS class for the

@uses $vars['item_class'] Additional CSS class for the elements @uses $vars['item_view'] Alternative view to render list items @uses $vars['no_results'] Message to display if no results (string|Closure)

Definition at line 20 of file gallery.php.

◆ $list_classes

$list_classes = ['elgg-gallery']

Definition at line 37 of file gallery.php.

◆ $list_items

$list_items = ''

Definition at line 50 of file gallery.php.

◆ $nav

if (isset( $vars[ 'item_class'])) $nav = ($pagination) ? elgg_view('navigation/pagination', $vars) : ''

Definition at line 47 of file gallery.php.

◆ $no_results

$no_results = elgg_extract('no_results', $vars, '')

Definition at line 24 of file gallery.php.

◆ $pagination

$pagination = elgg_extract('pagination', $vars, true)

Definition at line 22 of file gallery.php.

◆ $position

$position = elgg_extract('position', $vars, 'after')

Definition at line 23 of file gallery.php.

◆ else

foreach ( $items as $item) if ( $position=='before'||$position=='both') if (empty( $list_items) &&$no_results) else
Initial value:
{
echo elgg_format_element('ul', ['class' => $list_classes], $list_items)
$list_classes
Definition: gallery.php:37
$list_items
Definition: gallery.php:50
elgg_format_element($tag_name, array $attributes=array(), $text='', array $options=array())
Format an HTML element.
Definition: output.php:208

Definition at line 78 of file gallery.php.