Skip to content

Commit bd986de

Browse files
author
Bertrand Dunogier
committed
Added research doc for named types
1 parent 07afa58 commit bd986de

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

doc/research/named_field_types.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Named query field types
2+
3+
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.
4+
5+
## Examples
6+
7+
```
8+
ezplatform:
9+
named_query_types:
10+
children:
11+
query_type: eZ:Children
12+
default_parameters:
13+
location: '@=location'
14+
type: '@=returnedType'
15+
relating_content:
16+
query_type: eZ:ContentRelatedTo
17+
default_parameters:
18+
to_content: '@=content'
19+
type: '@=returnedType'
20+
```
21+
22+
## Extra features
23+
24+
### Default query type parameters
25+
26+
Content and location level (not field) based parameters can get a default value: the current content, its section, the returned type...
27+
28+
### Translation
29+
30+
That extra layer is a good place for translating parameters.
31+
32+
### Customization
33+
34+
Custom templates could be associated to named query field types, giving extra flexibility.
35+
36+
### Extensibiliy
37+
38+
Named queries make it easy for 3rd parties to add their own field types without developing any:
39+
40+
- define new query types, with custom criteria if needed
41+
- define named queries
42+

0 commit comments

Comments
 (0)