Skip to content

Commit

Permalink
DIGITAL-60: Change glossary link to entity reference, should not trig…
Browse files Browse the repository at this point in the history
…ger any js for now.
  • Loading branch information
cathybaptista committed Dec 17, 2024
1 parent d42f345 commit 4a96c35
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/sync/core.entity_form_display.node.guides.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- field.field.node.guides.field_deck
- field.field.node.guides.field_featured_image
- field.field.node.guides.field_guide_weight
- field.field.node.guides.field_hcd_glossary
- field.field.node.guides.field_kicker
- field.field.node.guides.field_page_weight
- field.field.node.guides.field_primary_image
Expand Down Expand Up @@ -69,6 +70,12 @@ content:
settings:
placeholder: ''
third_party_settings: { }
field_hcd_glossary:
type: options_select
weight: 51
region: content
settings: { }
third_party_settings: { }
field_kicker:
type: string_textfield
weight: 1
Expand Down
8 changes: 8 additions & 0 deletions config/sync/core.entity_view_display.node.guides.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- field.field.node.guides.field_deck
- field.field.node.guides.field_featured_image
- field.field.node.guides.field_guide_weight
- field.field.node.guides.field_hcd_glossary
- field.field.node.guides.field_kicker
- field.field.node.guides.field_page_weight
- field.field.node.guides.field_primary_image
Expand Down Expand Up @@ -59,6 +60,13 @@ content:
third_party_settings: { }
weight: 127
region: content
field_hcd_glossary:
type: entity_reference_entity_id
label: hidden
settings: { }
third_party_settings: { }
weight: 128
region: content
field_kicker:
type: string
label: above
Expand Down
2 changes: 2 additions & 0 deletions config/sync/core.entity_view_display.node.guides.teaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- field.field.node.guides.field_deck
- field.field.node.guides.field_featured_image
- field.field.node.guides.field_guide_weight
- field.field.node.guides.field_hcd_glossary
- field.field.node.guides.field_kicker
- field.field.node.guides.field_page_weight
- field.field.node.guides.field_primary_image
Expand Down Expand Up @@ -45,6 +46,7 @@ hidden:
field_deck: true
field_featured_image: true
field_guide_weight: true
field_hcd_glossary: true
field_kicker: true
field_page_weight: true
field_primary_image: true
Expand Down
23 changes: 23 additions & 0 deletions config/sync/field.field.node.guides.field_hcd_glossary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: 051af63b-df7a-49f4-8609-9600eb7ec67f
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_hcd_glossary
- node.type.guides
id: node.guides.field_hcd_glossary
field_name: field_hcd_glossary
entity_type: node
bundle: guides
label: 'HCD Glossary'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_vocabulary'
handler_settings:
target_bundles: null
auto_create: false
field_type: entity_reference
20 changes: 20 additions & 0 deletions config/sync/field.storage.node.field_hcd_glossary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 582cdc00-7855-441f-b6f4-6b0efe4f403d
langcode: en
status: true
dependencies:
module:
- node
- taxonomy
id: node.field_hcd_glossary
field_name: field_hcd_glossary
entity_type: node
type: entity_reference
settings:
target_type: taxonomy_vocabulary
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
{{ $guideData = index $.Site.Data.guidenav (.Params.guide) }}
{% endif %}
#}
{# this sets up the button to call the JS to show the glossary #}
{% if content.field_hcd_glossary['#title'] is not null %}
<button id="my-button">{{ content.field_hcd_glossary['#title'] }}</button>
{% endif %}

{% if guideData.showInPageNav %}
<div class="dg-guide__container">
Expand Down

0 comments on commit 4a96c35

Please sign in to comment.