-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecipe.yml
More file actions
126 lines (120 loc) · 3.49 KB
/
recipe.yml
File metadata and controls
126 lines (120 loc) · 3.49 KB
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
name: 'Drupalize.Me Blog content type'
description: 'Provides a Blog content type with Title, Body, and Tags; grants content editors permissions to create/edit blog posts.'
type: 'Content type'
install:
- node
- text
- taxonomy
config:
strict:
# Treat field storages strictly, since they influence database layout.
- field.storage.node.field_dme_blog_tags
actions:
# Ensure the role exists, then grant the needed permissions.
# (grantPermission(s) is the supported config action for user.role.*) [oai_citation:2‡Drupal Project](https://project.pages.drupalcode.org/distributions_recipes/config_actions.html)
user.role.content_editor:
createIfNotExists:
label: 'Content editor'
grantPermissions:
- 'create blog content'
- 'edit any blog content'
# Optional-but-practical if you keep auto_create: true on the Tags field.
- 'create terms in tags'
# Form display (widgets)
core.entity_form_display.node.blog.default:
createIfNotExists:
targetEntityType: node
bundle: blog
mode: default
status: true
setComponents:
- name: title
options:
type: string_textfield
weight: 0
region: content
- name: body
options:
type: text_textarea_with_summary
weight: 1
region: content
- name: field_dme_blog_tags
options:
type: entity_reference_autocomplete_tags
weight: 2
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
- name: uid
options:
type: entity_reference_autocomplete
weight: 5
region: content
- name: created
options:
type: datetime_timestamp
weight: 10
region: content
- name: status
options:
type: boolean_checkbox
weight: 120
region: content
# View display: Full
core.entity_view_display.node.blog.default:
createIfNotExists:
targetEntityType: node
bundle: blog
mode: default
status: true
setComponents:
- name: body
options:
type: text_default
label: hidden
weight: 0
region: content
- name: field_dme_blog_tags
options:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 10
region: content
- name: links
options:
weight: 100
region: content
# View display: Teaser
core.entity_view_display.node.blog.teaser:
createIfNotExists:
targetEntityType: node
bundle: blog
mode: teaser
status: true
content:
links:
weight: 100
region: content
setComponents:
- name: body
options:
type: text_summary_or_trimmed
label: hidden
weight: 0
region: content
- name: field_dme_blog_tags
options:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 10
region: content