Skip to content

Commit

Permalink
DIGITAL-200: Add resource topics vocab and terms
Browse files Browse the repository at this point in the history
* Enable taxonomy module
* Add taxonomy vocabulary for resource topics
* Adds resource topic terms
* Adds reference field for topics to point to one or more resource topics
* Update existing topics to refer to a resource topic
* Adds and themes view to display lists of topics grouped by resource topic.
  • Loading branch information
omerida committed Dec 30, 2024
1 parent 580e3e3 commit b4e573d
Show file tree
Hide file tree
Showing 31 changed files with 743 additions and 113 deletions.
16 changes: 2 additions & 14 deletions config/sync/core.entity_form_display.node.resources.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,10 @@ content:
maxlength_js_label: 'Content limited to @limit characters, remaining: <strong>@remaining</strong>'
maxlength_js_enforce: true
field_topics:
type: inline_entity_form_complex
type: options_buttons
weight: 4
region: content
settings:
form_mode: default
override_labels: false
label_singular: ''
label_plural: ''
allow_new: true
allow_existing: true
match_operator: CONTAINS
allow_duplicate: false
collapsible: true
collapsed: true
revision: false
removed_reference: optional
settings: { }
third_party_settings: { }
moderation_state:
type: moderation_state_default
Expand Down
17 changes: 12 additions & 5 deletions config/sync/core.entity_form_display.node.topics.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- field.field.node.topics.field_legislation
- field.field.node.topics.field_page_weight
- field.field.node.topics.field_primary_image
- field.field.node.topics.field_resource_topics
- field.field.node.topics.field_slug
- field.field.node.topics.field_summary
- node.type.topics
Expand Down Expand Up @@ -77,7 +78,7 @@ content:
third_party_settings: { }
field_featured_links:
type: paragraphs
weight: 13
weight: 14
region: content
settings:
title: Paragraph
Expand All @@ -97,7 +98,7 @@ content:
third_party_settings: { }
field_featured_resources:
type: paragraphs
weight: 12
weight: 13
region: content
settings:
title: Paragraph
Expand Down Expand Up @@ -137,9 +138,15 @@ content:
settings:
media_types: { }
third_party_settings: { }
field_resource_topics:
type: options_buttons
weight: 12
region: content
settings: { }
third_party_settings: { }
field_slug:
type: string_textfield
weight: 14
weight: 15
region: content
settings:
size: 60
Expand All @@ -165,7 +172,7 @@ content:
third_party_settings: { }
path:
type: path
weight: 30
weight: 16
region: content
settings: { }
third_party_settings: { }
Expand Down Expand Up @@ -203,7 +210,7 @@ content:
removed_reference: optional
third_party_settings: { }
url_redirects:
weight: 50
weight: 17
region: content
settings: { }
third_party_settings: { }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
uuid: 69a2b41e-b8b5-484c-99ff-aa177245cccf
langcode: en
status: true
dependencies:
config:
- taxonomy.vocabulary.resource_topics
module:
- path
- text
id: taxonomy_term.resource_topics.default
targetEntityType: taxonomy_term
bundle: resource_topics
mode: default
content:
description:
type: text_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
name:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 100
region: content
settings:
display_label: true
third_party_settings: { }
hidden:
publish_on: true
publish_state: true
unpublish_on: true
unpublish_state: true
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ content:
third_party_settings: { }
weight: 101
region: content
content_moderation_control:
settings: { }
third_party_settings: { }
weight: -20
region: content
field_deck:
type: text_default
label: above
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ content:
third_party_settings: { }
weight: 101
region: content
content_moderation_control:
settings: { }
third_party_settings: { }
weight: -20
region: content
links:
settings: { }
third_party_settings: { }
Expand Down
28 changes: 15 additions & 13 deletions config/sync/core.entity_view_display.node.topics.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- field.field.node.topics.field_legislation
- field.field.node.topics.field_page_weight
- field.field.node.topics.field_primary_image
- field.field.node.topics.field_resource_topics
- field.field.node.topics.field_slug
- field.field.node.topics.field_summary
- node.type.topics
Expand All @@ -29,27 +30,27 @@ content:
label: hidden
settings: { }
third_party_settings: { }
weight: 101
weight: 3
region: content
content_moderation_control:
settings: { }
third_party_settings: { }
weight: -20
weight: 0
region: content
field_deck:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 108
weight: 7
region: content
field_featured_communities:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 118
weight: 10
region: content
field_featured_links:
type: entity_reference_revisions_entity_view
Expand All @@ -58,7 +59,7 @@ content:
view_mode: featured_links
link: ''
third_party_settings: { }
weight: 8
weight: 1
region: content
field_featured_resources:
type: entity_reference_revisions_entity_view
Expand All @@ -67,7 +68,7 @@ content:
view_mode: default
link: ''
third_party_settings: { }
weight: 119
weight: 11
region: content
field_legislation:
type: link
Expand All @@ -79,7 +80,7 @@ content:
rel: ''
target: ''
third_party_settings: { }
weight: 117
weight: 9
region: content
field_page_weight:
type: number_integer
Expand All @@ -88,7 +89,7 @@ content:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
weight: 102
weight: 4
region: content
field_primary_image:
type: entity_reference_entity_view
Expand All @@ -97,26 +98,27 @@ content:
view_mode: default
link: false
third_party_settings: { }
weight: 114
weight: 8
region: content
field_slug:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 106
weight: 6
region: content
field_summary:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 104
weight: 5
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
weight: 2
region: content
hidden: { }
hidden:
field_resource_topics: true
2 changes: 2 additions & 0 deletions config/sync/core.entity_view_display.node.topics.teaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- field.field.node.topics.field_legislation
- field.field.node.topics.field_page_weight
- field.field.node.topics.field_primary_image
- field.field.node.topics.field_resource_topics
- field.field.node.topics.field_slug
- field.field.node.topics.field_summary
- node.type.topics
Expand Down Expand Up @@ -49,5 +50,6 @@ hidden:
field_legislation: true
field_page_weight: true
field_primary_image: true
field_resource_topics: true
field_slug: true
field_summary: true
29 changes: 29 additions & 0 deletions config/sync/field.field.node.topics.field_resource_topics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
uuid: 2e907097-408b-473f-8086-4fb7ba955204
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_resource_topics
- node.type.topics
- taxonomy.vocabulary.resource_topics
id: node.topics.field_resource_topics
field_name: field_resource_topics
entity_type: node
bundle: topics
label: 'Resource Topics'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
resource_topics: resource_topics
sort:
field: name
direction: asc
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
20 changes: 20 additions & 0 deletions config/sync/field.storage.node.field_resource_topics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 878b01e1-bec0-4d14-8adf-719997559c6d
langcode: en
status: true
dependencies:
module:
- node
- taxonomy
id: node.field_resource_topics
field_name: field_resource_topics
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
25 changes: 25 additions & 0 deletions config/sync/taxonomy.vocabulary.resource_topics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: 315c759e-5dd2-4073-a98e-0224b63b9a27
langcode: en
status: true
dependencies:
module:
- scheduler
third_party_settings:
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
publish_enable: false
publish_past_date: error
publish_past_date_created: false
publish_required: false
publish_revision: false
publish_touch: false
show_message_after_update: true
unpublish_enable: false
unpublish_required: false
unpublish_revision: false
name: 'Resource Topics'
vid: resource_topics
description: 'Used to categorize resources'
weight: 0
new_revision: false
Loading

0 comments on commit b4e573d

Please sign in to comment.