# Taxonomies Provides a configurable module for "Taxonomies" functionality not provided by Bolt ## Configuration ``` modules: taxonomies: true ``` ## Controllers ### TaxonomyController The taxonomies module provides a custom controller that can be used to create overviews for all items of a taxonomy. For example a page of all tags on a website. To use this feature, you need to add a route to this controller. For example: ``` taxonomylist: path: /{taxonomytype} defaults: _controller: cnd-design.taxonomies.controller:taxonomies requirements: # taxonomytype: controller.requirement:anyTaxonomyType taxonomytype: tags ``` This controller will use the template specified for the specified taxonomy in your `taxonomy.yml` under `listing_template`. The default is `taxonomies.twig`. Inside the template, you have these variables in addition to Bolt's standard context: * **taxonomy** - The configuration of the selected taxonomytype * **taxonomies** - An array of alphabetically grouped taxonomy entries, each with `slug` and `name` values. ### AsyncController The AsyncController provides two urls to use for Ajax calls in select elements. #### List of taxonomies by type Returns a list of all taxonomies of this taxonomytype for use in select lists. `/bolt/designs/async/{taxonomytype}' #### List of taxonomies by type Returns a list of all taxonomies of this taxonomytype for use in select lists. `/bolt/designs/async/{taxonomytype}' **GET Parameters** * *limit* max number of items to return * *offset* offset for items to return * *search* filter items to those containing given string ## Service The module also provides a Service that can be used to get more advanced information about taxonomies. The Service is also available in Twig templates as a `Taxonomies` object. * **values** - returns an array of ungrouped taxonomy entries, each with `slug` and `name` values. * **valuesAlphabetical** - returns an array of alphabetically grouped taxonomy entries, each with `slug` and `name` values.