Add series field to blog posts

This commit is contained in:
Oliver Davies 2020-05-10 19:58:27 +01:00
parent 9d7dd754b1
commit a130168765
5 changed files with 71 additions and 0 deletions

View file

@ -5,6 +5,7 @@ dependencies:
config: config:
- field.field.node.post.body - field.field.node.post.body
- field.field.node.post.field_excerpt - field.field.node.post.field_excerpt
- field.field.node.post.field_series
- field.field.node.post.field_tags - field.field.node.post.field_tags
- node.type.post - node.type.post
module: module:
@ -39,6 +40,16 @@ content:
third_party_settings: { } third_party_settings: { }
type: string_textarea type: string_textarea
region: content region: content
field_series:
weight: 124
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
type: entity_reference_autocomplete
region: content
field_tags: field_tags:
weight: 122 weight: 122
settings: settings:

View file

@ -5,6 +5,7 @@ dependencies:
config: config:
- field.field.node.post.body - field.field.node.post.body
- field.field.node.post.field_excerpt - field.field.node.post.field_excerpt
- field.field.node.post.field_series
- field.field.node.post.field_tags - field.field.node.post.field_tags
- node.type.post - node.type.post
module: module:
@ -29,6 +30,14 @@ content:
third_party_settings: { } third_party_settings: { }
type: basic_string type: basic_string
region: content region: content
field_series:
weight: 104
label: above
settings:
link: true
third_party_settings: { }
type: entity_reference_label
region: content
field_tags: field_tags:
weight: 102 weight: 102
label: above label: above

View file

@ -6,6 +6,7 @@ dependencies:
- core.entity_view_mode.node.teaser - core.entity_view_mode.node.teaser
- field.field.node.post.body - field.field.node.post.body
- field.field.node.post.field_excerpt - field.field.node.post.field_excerpt
- field.field.node.post.field_series
- field.field.node.post.field_tags - field.field.node.post.field_tags
- node.type.post - node.type.post
module: module:
@ -29,4 +30,5 @@ content:
third_party_settings: { } third_party_settings: { }
hidden: hidden:
body: true body: true
field_series: true
field_tags: true field_tags: true

View file

@ -0,0 +1,29 @@
uuid: 1f7182fd-848c-4e03-bb17-a8132c524451
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_series
- node.type.post
- taxonomy.vocabulary.blog_series
id: node.post.field_series
field_name: field_series
entity_type: node
bundle: post
label: Series
description: 'Is this post part of a series?'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
blog_series: blog_series
sort:
field: name
direction: asc
auto_create: false
auto_create_bundle: ''
field_type: entity_reference

View file

@ -0,0 +1,20 @@
uuid: 27708079-5d79-45ba-90f3-41c5303c2490
langcode: en
status: true
dependencies:
module:
- node
- taxonomy
id: node.field_series
field_name: field_series
entity_type: node
type: entity_reference
settings:
target_type: taxonomy_term
module: core
locked: false
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false