Currently, the only supported way to create URLs with query strings is a GET form like:
<form action={actionUri} method="GET">
<input type="text" name="query" />
// ...
</form>
Using routing arguments in combination with appendExceedingArguments is mostly a bad idea because it creates a routing cache entry for every combination.
For example:
Routes.yaml:
-
uriPattern: 'some-url'
defaults:
'@package': 'Some.Package'
'@controller': 'Some'
'@action': 'index'
appendExceedingArguments: true
TagList.fusion:
// ...
renderer = Neos.Fusion:Loop {
items = ${tags}
itemRenderer = Neos.Fusion:ActionUri {
package = 'Some.Package'
controller = 'Some'
action = 'index'
arguments {
tag = ${item}
}
}
}
This will generate a cache entry for every tag.
Instead, we should allow query parameters to be set explicitly:
renderer = Neos.Fusion:Loop {
items = ${tags}
itemRenderer = Neos.Fusion:ActionUri {
package = 'Some.Package'
controller = 'Some'
action = 'index'
queryParameters {
tag = ${item}
}
}
}
Currently, the only supported way to create URLs with query strings is a GET form like:
Using routing arguments in combination with
appendExceedingArgumentsis mostly a bad idea because it creates a routing cache entry for every combination.For example:
Routes.yaml:
TagList.fusion:
This will generate a cache entry for every tag.
Instead, we should allow query parameters to be set explicitly: