-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bertrand Dunogier
committed
Feb 18, 2020
1 parent
ad9095c
commit e30726e
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Named query field types | ||
|
||
A higher level version of the query field type. Through configuration, queries are associated to a name. Those are added added to the list of available field types. When added, they query type isn't show, and the parameters are immediately displayed for editing. It saves time when modelling the content by allowing to reuse the same type for a similar concept. | ||
|
||
## Examples | ||
|
||
``` | ||
ezplatform: | ||
named_query_types: | ||
children: | ||
query_type: eZ:Children | ||
default_parameters: | ||
location: '@=location' | ||
type: '@=returnedType' | ||
relating_content: | ||
query_type: eZ:ContentRelatedTo | ||
default_parameters: | ||
to_content: '@=content' | ||
type: '@=returnedType' | ||
``` | ||
|
||
## Extra features | ||
|
||
### Default query type parameters | ||
|
||
Content and location level (not field) based parameters can get a default value: the current content, its section, the returned type... | ||
|
||
### Translation | ||
|
||
That extra layer is a good place for translating parameters. | ||
|
||
### Customization | ||
|
||
Custom templates could be associated to named query field types, giving extra flexibility. | ||
|
||
### Extensibiliy | ||
|
||
Named queries make it easy for 3rd parties to add their own field types without developing any: | ||
|
||
- define new query types, with custom criteria if needed | ||
- define named queries | ||
|