# Load More Provides a configurable module for "Load More" pages on aggregation pages ## Paged Controller A version of the pages controller, where everything is hidden by a configuration key. Cleaner functionality but less flexible and harder to use. ### Configuration ``` modules: load-more: true # Configuration for optional Load-More module load-more: # The url path for this list. Needs to contain {key} route: '/more/{key}' # configuration set's for all lists paged-controller: mylist: # RelationFill pool to use pool: content # query parameters for RelationFill queries (parameters from POST will replace %placeholders) query-parameters: source: mysource # template parameters for use inside your template (parameters from POST will replace %placeholders) template-parameters: title: The listing page kicker: %tag% # Number of items to request per page items-per-page: 12 # base list of items to exclude (in addition to exclude variable from POST) excludes: [] # RelationFill bucket to store excluded items in bucket: default # parameters and route for url-generator to generate canonical of first page (parameters from POST will replace %placeholders) canonical-route: homepage canonical-parameters: slug: %tag% # The template to render the page with template: pages/paged/default.twig ``` ### Usage The paged content controller can be called by by either GET or POST. The request can contain the following parameters: **Url** `/more/` **Parameters** + **page** The page number to display + **exclude** an array of services with sub-arrays of keys to exclude (ex.: `exclude[kraken][]=765ef67ba6f7d` or `exclude[content][]=article/4` ) + **offset** an offset **in addition to the page parameter** to compensate for manually added items on start page + **parameters** a list of parameters to be applied to the content query and route generation (ex.: `parameters[tag]=beauty`) ## Simple Controller a version of the paged controller where most things are taken from the url and query parameters. Less clean but more flexible. ### Configuration ``` # Configuration for optional Load-More module load-more: simple-controller: # route for this controller - MUST have 'taxonomytype', 'slug' and 'page' route: /{taxonomytype}/{slug}/more/{page} # query parameters for RelationList query query-map: kategorie: category # use alternative 'category' as taxonomytype if 'kategorie' is given in url # pool to query for RelationList pool: glamour-fill # parameters for use inside the template template-parameters: kicker: Alles zum Thema # number of items per page items-per-page: 12 # bucket for shown items in RelationList bucket: default # template to use for rendering of the page template: pages/paged/default.twig # route name to use for generation of first page url canonical-route: taxonomylink # allways exclude these records from RelationList results base-excludes: myservice: - something123 - something-else ``` ### Usage The paged content controller can be called by by either GET or POST. The request can contain the following parameters: **Url** `/{taxonomytype}/{slug}/more/{page}` Depending on configured route. This is the default route. **Parameters** + **taxonomytype** The type of this taxonomy + **slug** The slug of the selected taxonomy + **page** The page number to display + **exclude** (Optional) an array of services with sub-arrays of keys to exclude (ex.: `exclude[kraken][]=765ef67ba6f7d` or `exclude[content][]=article/4` ) + **offset** (Optional) an offset **in addition to the page parameter** to compensate for manually added items on start page