Warning: Undefined variable $basepath in /home/tiki-doc/public_html/lib/wiki-plugins/wikiplugin_img.php on line 953 PluginList pagination or list control block | Documentation for Tiki Wiki CMS Groupware
Loading...
PluginList - list or pagination control block
The LIST plugin will display 50 results by default. Depending on the output configuration, this may take some time to render, so you might want to decrease the visible amount of results to improve performance by using this plugin-like control block in the LIST body content.
Control the maximum number of items
Up to Tiki12.3
Copy to clipboard
{list max="10"}
Tiki 11 and above
Copy to clipboard
{pagination max="10"}
Pagination with inbuilt templates
In order to actually see pagination (and not just a limit on the number of displayed items), you can use the parameter pagination="y" like so:
Copy to clipboard
{output template="table" pagination="y"}
Additionally, the pagination control can have the following parameters:
onclick
offset_jsvar
offset_arg to change the key used in the URL for pagination, useful when multiple lists are used within the same page
sort_arg to allow multiple lists to have separate sort keys
max for the number of results per page
Note that this setting will take precedence over any maxRecords setting which is set in the query string, and that maxRecords in the query string will only apply if offset is set anyway, while the above setting will work always.
Issues with list plugins in module
Sometimes a list module in a custom module will trigger errors like this:
This is due to the default sort order for the list plugin conflicting with a sort order on other lists (like trackers for instance).
To fix it add something like this:
You can use advanced pagination not using pagination="y" but instead directly creating the pagination within an output Smarty template which contains the following
Alternatively (at least since Tiki 24) you can add pagination=1 to your output plugin and pagination will be added to your results without needing to add the pagination_links code to your template, e.g.