Add CTAs to daily emails
Add a daily email CTA node type and reference field to attach a CTA to a daily email. Also update the RSS feed view to include the referenced body field value.
This commit is contained in:
parent
76868079ac
commit
2d55ea78f1
24 changed files with 1058 additions and 3 deletions
|
@ -0,0 +1,22 @@
|
|||
uuid: 125295f6-32ba-473d-a114-64b2f30a74a2
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- node.type.daily_email_cta
|
||||
id: node.daily_email_cta.promote
|
||||
field_name: promote
|
||||
entity_type: node
|
||||
bundle: daily_email_cta
|
||||
label: 'Promoted to front page'
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
default_value:
|
||||
-
|
||||
value: 0
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
on_label: 'On'
|
||||
off_label: 'Off'
|
||||
field_type: boolean
|
|
@ -4,6 +4,7 @@ status: true
|
|||
dependencies:
|
||||
config:
|
||||
- field.field.node.daily_email.body
|
||||
- field.field.node.daily_email.field_daily_email_cta
|
||||
- node.type.daily_email
|
||||
module:
|
||||
- path
|
||||
|
@ -29,6 +30,16 @@ content:
|
|||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
field_daily_email_cta:
|
||||
type: entity_reference_autocomplete
|
||||
weight: 121
|
||||
region: content
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
match_limit: 10
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
path:
|
||||
type: path
|
||||
weight: 30
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
uuid: 66add161-1d42-41b4-9eb3-adf47de3b200
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.field.node.daily_email_cta.body
|
||||
- node.type.daily_email_cta
|
||||
module:
|
||||
- path
|
||||
- text
|
||||
id: node.daily_email_cta.default
|
||||
targetEntityType: node
|
||||
bundle: daily_email_cta
|
||||
mode: default
|
||||
content:
|
||||
body:
|
||||
type: text_textarea_with_summary
|
||||
weight: 2
|
||||
region: content
|
||||
settings:
|
||||
rows: 9
|
||||
summary_rows: 3
|
||||
placeholder: ''
|
||||
show_summary: false
|
||||
third_party_settings: { }
|
||||
created:
|
||||
type: datetime_timestamp
|
||||
weight: 10
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
path:
|
||||
type: path
|
||||
weight: 30
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
promote:
|
||||
type: boolean_checkbox
|
||||
weight: 15
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
simple_sitemap:
|
||||
weight: 10
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
status:
|
||||
type: boolean_checkbox
|
||||
weight: 120
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
sticky:
|
||||
type: boolean_checkbox
|
||||
weight: 16
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
title:
|
||||
type: string_textfield
|
||||
weight: -5
|
||||
region: content
|
||||
settings:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
uid:
|
||||
type: entity_reference_autocomplete
|
||||
weight: 5
|
||||
region: content
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
match_limit: 10
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
url_redirects:
|
||||
weight: 50
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
hidden: { }
|
|
@ -4,6 +4,7 @@ status: true
|
|||
dependencies:
|
||||
config:
|
||||
- field.field.node.daily_email.body
|
||||
- field.field.node.daily_email.field_daily_email_cta
|
||||
- node.type.daily_email
|
||||
module:
|
||||
- text
|
||||
|
@ -21,4 +22,5 @@ content:
|
|||
weight: 0
|
||||
region: content
|
||||
hidden:
|
||||
field_daily_email_cta: true
|
||||
links: true
|
||||
|
|
|
@ -5,6 +5,7 @@ dependencies:
|
|||
config:
|
||||
- core.entity_view_mode.node.rss
|
||||
- field.field.node.daily_email.body
|
||||
- field.field.node.daily_email.field_daily_email_cta
|
||||
- node.type.daily_email
|
||||
module:
|
||||
- layout_builder
|
||||
|
@ -27,4 +28,5 @@ content:
|
|||
weight: 0
|
||||
region: content
|
||||
hidden:
|
||||
field_daily_email_cta: true
|
||||
links: true
|
||||
|
|
|
@ -5,6 +5,7 @@ dependencies:
|
|||
config:
|
||||
- core.entity_view_mode.node.teaser
|
||||
- field.field.node.daily_email.body
|
||||
- field.field.node.daily_email.field_daily_email_cta
|
||||
- node.type.daily_email
|
||||
module:
|
||||
- text
|
||||
|
@ -23,4 +24,5 @@ content:
|
|||
weight: 0
|
||||
region: content
|
||||
hidden:
|
||||
field_daily_email_cta: true
|
||||
links: true
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
uuid: a09e31bc-1142-4441-a82c-aa658d1e45fa
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.field.node.daily_email_cta.body
|
||||
- node.type.daily_email_cta
|
||||
module:
|
||||
- text
|
||||
- user
|
||||
id: node.daily_email_cta.default
|
||||
targetEntityType: node
|
||||
bundle: daily_email_cta
|
||||
mode: default
|
||||
content:
|
||||
body:
|
||||
type: text_default
|
||||
label: hidden
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
links:
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 100
|
||||
region: content
|
||||
hidden: { }
|
|
@ -0,0 +1,30 @@
|
|||
uuid: 26873112-e7a7-4730-8b8a-abe73e29cc9b
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- core.entity_view_mode.node.teaser
|
||||
- field.field.node.daily_email_cta.body
|
||||
- node.type.daily_email_cta
|
||||
module:
|
||||
- text
|
||||
- user
|
||||
id: node.daily_email_cta.teaser
|
||||
targetEntityType: node
|
||||
bundle: daily_email_cta
|
||||
mode: teaser
|
||||
content:
|
||||
body:
|
||||
type: text_summary_or_trimmed
|
||||
label: hidden
|
||||
settings:
|
||||
trim_length: 600
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
links:
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 100
|
||||
region: content
|
||||
hidden: { }
|
|
@ -0,0 +1,29 @@
|
|||
uuid: 115fb0c0-03eb-43b1-8b89-3740b2645160
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_daily_email_cta
|
||||
- node.type.daily_email
|
||||
- node.type.daily_email_cta
|
||||
id: node.daily_email.field_daily_email_cta
|
||||
field_name: field_daily_email_cta
|
||||
entity_type: node
|
||||
bundle: daily_email
|
||||
label: CTA
|
||||
description: ''
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
handler: 'default:node'
|
||||
handler_settings:
|
||||
target_bundles:
|
||||
daily_email_cta: daily_email_cta
|
||||
sort:
|
||||
field: title
|
||||
direction: ASC
|
||||
auto_create: false
|
||||
auto_create_bundle: ''
|
||||
field_type: entity_reference
|
24
config/sync/field.field.node.daily_email_cta.body.yml
Normal file
24
config/sync/field.field.node.daily_email_cta.body.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
uuid: 4bfa25ff-4011-4978-9566-299540a4fc92
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.body
|
||||
- node.type.daily_email_cta
|
||||
module:
|
||||
- text
|
||||
id: node.daily_email_cta.body
|
||||
field_name: body
|
||||
entity_type: node
|
||||
bundle: daily_email_cta
|
||||
label: Body
|
||||
description: ''
|
||||
required: true
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
display_summary: true
|
||||
required_summary: false
|
||||
allowed_formats: { }
|
||||
field_type: text_with_summary
|
19
config/sync/field.storage.node.field_daily_email_cta.yml
Normal file
19
config/sync/field.storage.node.field_daily_email_cta.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
uuid: 1df230c0-e769-4208-88a7-19c756975886
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
id: node.field_daily_email_cta
|
||||
field_name: field_daily_email_cta
|
||||
entity_type: node
|
||||
type: entity_reference
|
||||
settings:
|
||||
target_type: node
|
||||
module: core
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: true
|
||||
indexes: { }
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
17
config/sync/node.type.daily_email_cta.yml
Normal file
17
config/sync/node.type.daily_email_cta.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
uuid: aafaaf8f-2670-4202-bc20-2bc31312859b
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- menu_ui
|
||||
third_party_settings:
|
||||
menu_ui:
|
||||
available_menus: { }
|
||||
parent: ''
|
||||
name: 'Daily email CTA'
|
||||
type: daily_email_cta
|
||||
description: 'A call to action to attach to a daily email.'
|
||||
help: null
|
||||
new_revision: true
|
||||
preview_mode: 1
|
||||
display_submitted: false
|
|
@ -23,6 +23,68 @@ display:
|
|||
position: 0
|
||||
display_options:
|
||||
fields:
|
||||
body_1:
|
||||
id: body_1
|
||||
table: node__body
|
||||
field: body
|
||||
relationship: field_daily_email_cta
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: field
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: text_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
|
@ -99,8 +161,8 @@ display:
|
|||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
alter_text: true
|
||||
text: "{{ body }}\r\n{{ body_1 }}"
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
|
@ -494,7 +556,16 @@ display:
|
|||
distinct: false
|
||||
replica: false
|
||||
query_tags: { }
|
||||
relationships: { }
|
||||
relationships:
|
||||
field_daily_email_cta:
|
||||
id: field_daily_email_cta
|
||||
table: node__field_daily_email_cta
|
||||
field: field_daily_email_cta
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: 'field_daily_email_cta: Content'
|
||||
plugin_id: standard
|
||||
required: false
|
||||
header: { }
|
||||
footer: { }
|
||||
display_extenders: { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue