Elgg  Version 5.1
list.php File Reference

Go to the source code of this file.


 $items = elgg_extract('items', $vars)
 View a list of items. More...
if(!$items) if(!is_array($items)||count($items)==0) $position = elgg_extract('position', $vars, 'after')
 $pagination_behaviour = elgg_extract('pagination_behaviour', $vars, elgg_get_config('pagination_behaviour'))
 $pagination = (bool) elgg_extract('pagination', $vars, true)
if(elgg_in_context('widget')) $pagination_before_options = (array) elgg_extract('pagination_before_options', $vars, [])
 $pagination_after_options = (array) elgg_extract('pagination_after_options', $vars, [])
if(in_array($pagination_behaviour, ['ajax-append', 'ajax-append-auto'])) $list_classes = elgg_extract_class($vars, 'elgg-list', 'list_class')
 $list_item_view = elgg_extract('list_item_view', $vars)
if(empty($list_item_view)||!elgg_view_exists($list_item_view)) $index = 0
 $list_items = ''
foreach($items as $item) $result = ''
if($pagination &&($position== 'before'||$position== 'both')) if(empty($list_items)) else
if($pagination &&($position== 'after'||$position== 'both')) $limit = elgg_extract('limit', $vars)
if(!$pagination &&$limit!==false &&!empty($items)&&count($items) >=$limit) $base_url = elgg_extract('base_url', $vars)
if(!empty($base_url)) $id = null
if($pagination) $container_classes = ['elgg-list-container']
 if ($pagination &&($pagination_behaviour!== 'navigate'))

Variable Documentation

if (!$pagination &&$limit!==false &&!empty($items)&&count($items) >=$limit) $base_url = elgg_extract('base_url', $vars)

Definition at line 114 of file list.php.

if ($pagination) $container_classes = ['elgg-list-container']

Definition at line 135 of file list.php.

if (!empty($base_url)) $id = null

Definition at line 121 of file list.php.

if (empty($list_item_view)||!elgg_view_exists($list_item_view)) $index = 0

Definition at line 68 of file list.php.

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

View a list of items.

For options to influence the pagination also look at the view 'navigation/pagination'

$vars['items'] Array of ElggEntity, ElggAnnotation or ElggRiverItem objects $vars['pagination'] Show pagination? (default: true) $vars['pagination_behaviour'] Which pagination behaviour to use (default: site preference) $vars['pagination_after_options'] Specific options for the pagination view to be used when the pagination is shown after the item list $vars['pagination_before_options'] Specific options for the pagination view to be used when the pagination is shown before the item list $vars['position'] Position of the pagination: before, after, or both $vars['list_class'] Additional CSS class for the

$vars['item_class'] Additional CSS class for the elements $vars['item_view'] Alternative view to render list items content $vars['list_item_view'] Alternative view to render list items

Definition at line 19 of file list.php.

if ($pagination &&($position== 'after'||$position== 'both')) $limit = elgg_extract('limit', $vars)

Definition at line 109 of file list.php.

if (in_array($pagination_behaviour,['ajax-append', 'ajax-append-auto'])) $list_classes = elgg_extract_class($vars, 'elgg-list', 'list_class')

Definition at line 61 of file list.php.

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

Definition at line 63 of file list.php.

$list_items = ''

Definition at line 69 of file list.php.

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

Definition at line 33 of file list.php.

$pagination_after_options = (array) elgg_extract('pagination_after_options', $vars, [])

Definition at line 41 of file list.php.

if (elgg_in_context('widget')) $pagination_before_options = (array) elgg_extract('pagination_before_options', $vars, [])

Definition at line 39 of file list.php.

$pagination_behaviour = elgg_extract('pagination_behaviour', $vars, elgg_get_config('pagination_behaviour'))

Definition at line 32 of file list.php.

if (!$items) if (!is_array($items)||count($items)==0) $position = elgg_extract('position', $vars, 'after')

Definition at line 31 of file list.php.

foreach ($items as $item) $result = ''

Definition at line 87 of file list.php.

if ($pagination &&($position== 'before'||$position== 'both')) if (empty($list_items)) else
Initial value:
Definition: list.php:69
if(in_array($pagination_behaviour, ['ajax-append', 'ajax-append-auto'])) $list_classes
Definition: list.php:61
foreach($items as $item) $result
Definition: list.php:87
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145

Definition at line 98 of file list.php.

if($pagination &&($pagination_behaviour!== 'navigate'))

Definition at line 136 of file list.php.