-
-
Notifications
You must be signed in to change notification settings - Fork 79
/
ContentTypes.yml
318 lines (308 loc) · 17.7 KB
/
ContentTypes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# Possible settings and validator configurations for the different field types
#
# ezbinaryfile
# validator-configuration:
# FileSizeValidator: { maxFileSize: false } # in MB
#
# ezcountry
# field-settings:
# isMultiple: false
#
# ezdatetime
# field-settings:
# defaultType: 0 # 1=default to current datetime
# useSeconds: false
# dateInterval: null
#
# ezdate
# field-settings:
# defaultType: 0 # 1=default to current date
#
# ezemail
# validator-configuration:
# EmailAddressValidator: { }
#
# ezfloat
# validator-configuration:
# FloatValueValidator: { minFloatValue: null, maxFloatValue: null }
#
# ezimage
# validator-configuration:
# FileSizeValidator: { maxFileSize: false } # in MB
#
# ezinteger
# validator-configuration:
# IntegerValueValidator: { minIntegerValue: null, maxIntegerValue: null }
#
# ezmatrix
# field-settings:
# minimum_rows: 0 # only supported by the EzPlatformMatrixFieldtype field type, not the ezcommunity one
# columns: # only supported by the EzPlatformMatrixFieldtype field type, not the ezcommunity one
# - { identifier: colName }
# columnList: # only supported by the ezcommunity field type, not the EzPlatformMatrixFieldtype one
# - { name: colname, identifier: colId, index: colIdx }
#
# ezmedia
# field-settings:
# mediaType: html5_video
# validator-configuration:
# FileSizeValidator: { maxFileSize: false } # in MB
#
# ezobjectrelation
# field-settings:
# selectionMethod: 0 # 1=drop-down list
# selectionRoot: null # location id
# selectionContentTypes: [ ] # array of ContentType identifiers; works since eZ Platform v1.11.0
#
# ezobjectrelationlist
# field-settings:
# selectionMethod: 0 # 1=drop-down list
# selectionDefaultLocation: 2
# selectionContentTypes: [ ] # array of ContentType identifiers
# validator-configuration: # since eZ Platform v2.0
# RelationListValueValidator:
# selectionLimit: 1 # you can specify how many elements can be selected maximum
#
# ezselection
# field-settings:
# isMultiple: false
# options: [ ] # array of option names
#
# ezstring
# validator-configuration:
# StringLengthValidator: { maxStringLength: false, minStringLength: false }
#
# eztext
# field-settings:
# textRows: 10
#
# eztime
# field-settings:
# defaultType: 0 # 1=default to current time
# useSeconds: false
#
# ezxmltext
# field-settings:
# numRows: 10
# tagPreset: 0
-
type: content_type
mode: create
content_type_group: x # Id or identifier of the group we want to put the new content type into
identifier: xyz # Class identifier
name: xyz # Name of new class. Either a string, or an array in the format { "eng-GB": "Name", "fre-FR": "Nom", ... }
name_pattern: pattern # Pattern to use for the name of the contents (ex: <title>)
attributes:
-
type: xyz # Attribute type (See list https://doc.ez.no/display/EZP/FieldTypes+reference)
name: xyz # Name of new attribute. Either a string, or an array in the format { "eng-GB": "Name", "fre-FR": "Nom", ... }
identifier: xyz
description: # Optional. Either a string, or an array in the format { "eng-GB": "Name", "fre-FR": "Nom", ... }
required: true|false # Optional
searchable: true|false # Optional
info-collector: true|false # Optional
disable-translation: true|false # Optional
category: default|meta # Optional
default-value: # Optional
field-settings: array # Optional, can be used for various field type specific settings
# Within the settings values, the following tag are *currently* resolved:
# reference:<ref>, tag:<tag name>, location:<location remote id>
# *Note* that this is for backwards compatibility and may change in the future
position: # Optional, will set the attribute to this position.
# NB: unlike in the eZ4 Admin Interface, fields without specified positions will be counted 1,2,3...
# NB: mixing attributes with a position field and some without it might give unexpected results
default_always_available: true|false # Optional, defaults to true
description: xyz # Optional. Either a string, or an array in the format { "eng-GB": "This", "fre-FR": "Ceci", ... }
is_container: true|false # Optional, defaults to false
lang: xxx-YY # Optional, will fallback to default language if not provided (--default-language option or 'eng-GB' by default)
url_name_pattern: pattern # Optional
default_sort_field: x # Optional. See Locations.yml for details
default_sort_order: ASC|DESC # Optional
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references: # Optional
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # An attribute to get the value of for the reference.
# Supports: content_type_id, content_type_identifier, creation_date, description,
# modification_date, name, name_pattern, remote_id, status, url_name_pattern
# and content_type_groups_ids (the latter returning an array)
# The shorthand 'id' can be used instead of 'content_type_id'
# The shorthand 'identifier' can be used instead of 'content_type_identifier'
# For name and description, the language used will correspond to the 'lang' tag
# It also supports attributes.$identifier.$field and complex expressions, such as f.e.
# attributes.title.required (boolean value)
# attributes.ezobjectrelationlist."field-settings".selectionContentTypes.length(@) (nr. of cotent-types allowed in an object-relations field)
# (for the full syntax supported, see jmespath)
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
type: content_type
mode: update
match: # Only one of the following can be specified, to define which content type(s) to update
identifier: xyz # string|string[] The identifier of the content type
id: x # int|int[]
remote_id: abc # string|string[]
all: ~ # matches ALL content types
or: # match any of the conditions below. *NB:* less efficient that using the array notation for a single condition
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition can be any of ones specified above, including 'and' and 'or'
and: # match all of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
not: # matches elements NOT satisfying the wrapped condition
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
match_tolerate_misses: false # optional. Do not fail the execution if there is no item matching, when matching by id or identifier
content_type_group: x # Id or identifier of a new group we want to put the new content type into (this will not remove it from the current group)
remove_content_type_group: x # Id or identifier of a group we want to remove this content type from
default_always_available: true|false # Optional
description: xyz # Optional, will be updated if set. Either a string, or an array in the format { "eng-GB": "This", "fre-FR": "ceci", ... }
is_container: true|false # Optional, will be updated if set
lang: xxx-YY # Optional, will fallback to default language if not provided (--default-language option or 'eng-GB' by default)
name: xyz # Optional, will be updated if set. Either a string, or an array in the format { "eng-GB": "name", "fre-FR": "Nom", ... }
name_pattern: xyz # Optional, will be updated if set
new_identifier: xyz # Optional, will update the identifier if set
url_name_pattern: xyz # Optional, will be updated if set
default_sort_field: x # Optional, will be updated if set. See Locations.yml for details
default_sort_order: ASC|DESC # Optional, will be updated if set
attributes: # Optional, if set will update existing ones or add new ones.
-
identifier: xyz # Identifier of the attribute to update or identifier of the new attribute to add
new_identifier: xyz # Optional, will update the identifier if set. Not used if adding a new attribute
type: xyz # Mandatory if adding a new attribute. Not used otherwise
name: # Optional, will be updated if set. Either a string, or an array in the format { "eng-GB": "Name", "fre-FR": "Nom", ... }
description: # Optional, will be updated if set. Either a string, or an array in the format { "eng-GB": "Name", "fre-FR": "Nom", ... }
required: true|false # Optional, will be updated if set
searchable: true|false # Optional, will be updated if set
info-collector: true|false # Optional, will be updated if set
disable-translation: true|false # Optional, will be updated if set
category: default|meta # Optional, will be updated if set
default-value: # Optional, will be updated if set
field-settings: array # Optional, can be used for various field type specific settings
position: # Optional, will move the attribute to this position
# NB: mixing attributes with a position field and some without it might give unexpected results
# NB: the eZ4 Admin Interface does *not* display the actual field position, and shows 10,20,30 instead...
# In order to see the _real_ position number that fields currently have it is recommended to generate
# a ContentType `create` migration and find it there
remove_attributes: [identifier1, identifier2, identifier3] # Optional, remove all attributes that have their identifiers listed here.
# As an alternative, use the string '*' to mean: remove all existing attributes
# except the ones specified in the 'attributes' element above
remove_drafts: false # Optional, if true will remove any existing Drafts for this Content Type
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references: # Optional
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # An attribute to get the value of for the reference
# Supports: content_type_id, content_type_identifier, creation_date, modification_date,
# name_pattern, remote_id, status, url_name_pattern
# and content_type_groups_ids (the latter returning an array)
# The shorthand 'id' can be used instead of 'content_type_id'
# The shorthand 'identifier' can be used instead of 'content_type_identifier'
# 'count' can be used to set a reference to the number of items matched
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
expect: one|any|many # Optional. If set, the number of matched items will be validated, and the type of values set to created references will change
# 'one': only one element should be matched; reference values will be scalars
# 'any': zero or more element should be matched; reference values will be arrays
# 'many': one or more element should be matched; reference values will be arrays
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
# Delete one or more content type(s)
type: content_type
mode: delete
match: # Only one of the following can be specified, to define which content type(s) to delete
identifier: xyz # string|string[] The identifier of the content type
id: x # int|int[]
remote_id: abc # string|string[]
all: ~ # matches ALL content types
or: # match any of the conditions below. *NB:* less efficient that using the array notation for a single condition
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition can be any of ones specified above, including 'and' and 'or'
and: # match all of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
not: # matches elements NOT satisfying the wrapped condition
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
match_tolerate_misses: false # optional. Do not fail the execution if there is no item matching, when matching by id or identifier
references: # Optional. See above for allowed values
expect: one|any|many # Optional. If set, the number of matched items will be validated, and the type of values set to created references will change
# 'one': only one element should be matched; reference values will be scalars
# 'any': zero or more element should be matched; reference values will be arrays
# 'many': one or more element should be matched; reference values will be arrays
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
type: content_type
mode: load
match: # See docs above for update and delete
match_tolerate_misses: # Optional. See above for allowed values
references: # Optional. See above for allowed values
expect: # Optional. See above for allowed values
if: # Optional. See above for allowed values
# Attribute examples.
# Please also note that you can use references in the field-settings area.
-
type: content_type
mode: update
attributes: # Optional, if set will update existing ones or add new ones.
# Object Relation List
-
identifier: class_identifier
type: ezobjectrelationlist
name: Name
description: Description of stuff
required: false
searchable: true
info-collector: false
disable-translation: false
category: meta
field-settings:
selectionDefaultLocation: reference:some_reference_location_id # OR a location ID
selectionContentTypes: [content_type_identifier] # This MUST be an array
selectionMethod: 0 # 0 is browse - 1 is dropdown
position: 60
# Object Relation
-
identifier: image
type: ezobjectrelation
name: Image
description: The image to use for the article
required: false
searchable: true
info-collector: false
disable-translation: false
category: default
field-settings:
selectionRoot: reference:some_reference_location_id # OR a location ID
position: 50
# Nova SEO Metas
-
type: novaseometas
name: SEO Meta
identifier: seo_meta
description: The meta data settings for SEO
required: false
info-collector: false
searchable: false # CANNOT be searchable
disable-translation: false
category: meta
position: 130