This component allows you to set an array of items, and to access any of them individually, or list all of them in a loop.
To show array elements individually, they must be referenced explicitly, meaning their array key must b ereferenced.
{$array_list.0}
{$array_list.2}
{$array_list.1}
orange
pear
apple
To show array elements individually, they must be referenced explicitly, meaning their array key must b ereferenced.
array_element - {$$array_element}
array_element - orange
array_element - apple
array_element - pear
array_element - banana
Name | Required | Default | Description |
---|---|---|---|
delimiter | Required | N/A | The value separator used in value. Eg. , |
json | Required | N/A | If set to 1, then delimiter isn't required and the input is assumed to be json |
key | Required | N/A | The name of the array |
value | Required | N/A | The values you want to assign to the array, delimited. |
Name | Description |
---|---|
loop.hasResults | The contents of this variable will be either 0 or 1, depending on if there are items in the list. |
loop.oddClass | The contents of this variable will reflect the "oddClass" attribute. This will only be set for odd rownumbers. |
loop.evenClass | The contents of this variable will reflect the "evenClass" attribute. This will only be set for even rownumbers. |
loop.index | The 0-based index of the item in the loop. (Will contain 0,1,2,3,4, etc.) |
loop.count | The count of the current item in the loop. (Will contain 1,2,3,4,5 etc.) |
loop.currentPage | If a pager is involved in this loop, this will contain the current page number (0-based index). If page information is not available, this will be 0. |
loop.currentPage1 | This value is currentPage + 1. This number can be useful to display the current page number to use user. (people generally count from 1, not 0). |
loop.totalPages | Total number of pages avaiable in this loop. This will be 0 if the loop does not support paging. |
loop.totalItems | Total number of individual items. This will be 0 if the loop does not support paging. |
loop.pageSize | Total number of items on 1 single page. This will be 0 if the loop does not support paging. |
array_{key} | An array you provided key="foo" the variable would be $array_foo.1, $array_foo.2 |