Release notes for the Router Craft CMS plugin.
- Added new
types
filter for filtering by multiple entry types. - Added
assumeUniqueHandles
optional parameter for thetype
andtypes
filters.
- Fixed a bug where the
month
filter would fail on user-defined fields in Craft 5.
- Added support for Craft 5.
- The
type
filter's value will be a singleEntryType
on Craft 5+ (it remains an array ofEntryType[]
on Craft 3, and 4). - An
yii\base\InvalidConfigException
is thrown if thefield
filter is missing thehandle
configuration option.
- Improved compatibility of
relatedTo
elements' descendants on Craft 4.3 and above.
- Improved compatibility of
relatedTo
elements' descendants on older versions of Craft and PHP.
- Added shorthand for the Type filter's
value
parameter.
- Fixed a bug where an element's descendants were incorrectly passed to the
relatedTo
criteria.
- Added new filters for handling single and multiple Tags as
relatedTo
criteria.
- Added support for Craft 4.
- Restored pre
v1.2.0
behaviour of therelatedTo
criteria’selement
key being a single element (and not an array) for Category, Entry, and URI filters (for elements without descendants). - Fixed a bug where
relatedTo
criteria might have empty array items for elements without descendants.
- Added new Categories, Entries, and URIs filters for handling multiple items per filter.
- Added
combineSegments
configuration parameter which can be set tofalse
to disable segment combinations in routing rules.
- Added a new Month filter.
- Router now requires Craft 3.7 or later.
- Fixed a bug where the
section
parameter on theentry
filter type would be ignored.
- Added a plugin icon.
miranj\router\controllers\DefaultController::fetchSingle()
now queries across multiple sites, along withunique()
.
- Added a new Entry Type filter.
- Added a
router
service. - Added a
craft.router
Twig global variable. - Added
craft.router.params()
to access all named params from the URL. - Added
craft.router.rawParams()
to access all named params (with raw values) from the URL. - Added
craft.router.url()
to build a URL out of named routes and optional params. - Added
craft.router.urlMerge()
to build a URL out of the current route and additional params. - Added
miranj\router\services\Router
. - Added
miranj\router\services\Router::getParams()
. - Added
miranj\router\services\Router::getRawParams()
. - Added
miranj\router\services\Router::getUrl()
. - Added
miranj\router\services\Router::getUrlMerge()
.
- Fixed bug where top level URL rule (with no segments) would get registered twice.
- Added Craft 3 compatibility.
- Added shorthand for Year filter's
field
config. - Added new Date filter with support for year/month/day.
- Add the ability to filter by Section.
- Add the ability to filter by URI.
- Add the ability to filter by Field.
- Drop support for the mandatory
list
param.
- Initial release.