Elgg
Version master
|
Go to the source code of this file.
Variables | |
$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')) | |
if (! $pagination &&$limit !==false &&!empty( $items) &&count( $items) >=$limit) $base_url = elgg_extract('base_url', $vars) |
if (empty( $list_item_view)||!elgg_view_exists( $list_item_view)) $index = 0 |
$items = elgg_extract('items', $vars) |
View a list of items.
For options to influence the pagination also look at the view 'navigation/pagination'
@uses $vars['items'] Array of ElggEntity, ElggAnnotation or ElggRiverItem objects @uses $vars['pagination'] Show pagination? (default: true) @uses $vars['pagination_behaviour'] Which pagination behaviour to use (default: site preference) @uses $vars['pagination_after_options'] Specific options for the pagination view to be used when the pagination is shown after the item list @uses $vars['pagination_before_options'] Specific options for the pagination view to be used when the pagination is shown before the item list @uses $vars['position'] Position of the pagination: before, after, or both @uses $vars['list_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 content @uses $vars['list_item_view'] Alternative view to render list items
if ( $pagination &&( $position=='after'||$position=='both')) $limit = elgg_extract('limit', $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) |
$pagination = (bool) elgg_extract('pagination', $vars, true) |
$pagination_after_options = (array) elgg_extract('pagination_after_options', $vars, []) |
if (elgg_in_context( 'widget')) $pagination_before_options = (array) elgg_extract('pagination_before_options', $vars, []) |
$pagination_behaviour = elgg_extract('pagination_behaviour', $vars, elgg_get_config('pagination_behaviour')) |
if (! $items) if (!is_array( $items)||count( $items)==0) $position = elgg_extract('position', $vars, 'after') |