An AJAXified page list block for concrete5. Navigate a Page List block's pages and apply attribute filters without reloading the whole page.
Tested with v5.6 but may work with earlier versions.
- Download the package ZIP file
- Extract the
concrete5_ajax_page_list-master
directory and rename it toajax_page_list
- Upload to your concrete5 installation's
/packages
directory - Install the package through the Extend concrete5 page of the Dashboard
- Select the Ajax Page List custom template for your Page List block
- Have a nice cup of tea :)
No configuration beyond the above is required to render and paginate the Page List (this is the default behaviour). concrete5's Page List objects are powerful things though, and sometimes we want to filter them using custom select attributes.
To enable filtering by custom select attributes:
-
Create your select attributes in the Page Attributes page of the Dashboard and note the handles you give each attribute.
-
Add your custom select attributes' handles to the
$filter_attributes
array near the top of theajax_page_list.php
custom template file (which can be found in the/packages/ajax_page_list/blocks/page_list
directory):
For example, if your select attributes' handles are my_colour_attribute
and my_size_attribute
, the $filter_attributes
array will look like this:
$filter_attributes = array('my_colour_attribute', 'my_size_attribute');
The package will automatically render each attribute's options as links above the AJAXified Page List. Note: The filters are cumulative, i.e. the Page List can filter by more than one select attribute simultaneously.
Click the thumbnails for larger versions.
###No filters -- just paging
###Filters displayed but not applied
###Filters applied