Skip to content

Commit

Permalink
updated spotlight display
Browse files Browse the repository at this point in the history
  • Loading branch information
imonroe committed Mar 4, 2024
1 parent 6850dc8 commit ee3bb53
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 47 deletions.
126 changes: 82 additions & 44 deletions config/sync/core.entity_view_display.node.spotlight.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ third_party_settings:
class: ''
weight: 0
additional: { }
90087c67-5f11-44a2-a588-839d2e2973fe:
uuid: 90087c67-5f11-44a2-a588-839d2e2973fe
3f3c9a5f-b8bc-4ce5-930e-4c8942b34819:
uuid: 3f3c9a5f-b8bc-4ce5-930e-4c8942b34819
region: spotlight_hero_text
configuration:
id: 'field_block:node:spotlight:type'
label: 'Content type'
id: 'field_block:node:spotlight:su_soe_department'
label: Department
label_display: '0'
provider: layout_builder
context_mapping:
Expand All @@ -75,92 +75,92 @@ third_party_settings:
link: false
third_party_settings:
field_formatter_class:
class: spotlight-banner-text__header
weight: -10
class: ''
weight: -6
additional: { }
63d93c8e-eb7c-44f1-9bed-188a48aabf70:
uuid: 63d93c8e-eb7c-44f1-9bed-188a48aabf70
a704578a-b413-4b74-a71e-43967f0ba5cb:
uuid: a704578a-b413-4b74-a71e-43967f0ba5cb
region: spotlight_hero_text
configuration:
id: 'field_block:node:spotlight:title'
label: Name
id: 'field_block:node:spotlight:su_spotlight_degrees'
label: Degrees
label_display: '0'
provider: layout_builder
context_mapping:
entity: layout_builder.entity
view_mode: view_mode
formatter:
type: entity_title_heading
type: string
label: hidden
settings:
tag: h1
link_to_entity: false
third_party_settings:
field_formatter_class:
class: ''
weight: -9
weight: -7
additional: { }
3f3c9a5f-b8bc-4ce5-930e-4c8942b34819:
uuid: 3f3c9a5f-b8bc-4ce5-930e-4c8942b34819
756b83ac-6771-4e9e-8345-1ef0f54ef67c:
uuid: 756b83ac-6771-4e9e-8345-1ef0f54ef67c
region: spotlight_hero_text
configuration:
id: 'field_block:node:spotlight:su_soe_department'
label: Department
id: 'field_block:node:spotlight:su_spotlight_person_title'
label: 'Title of Individual'
label_display: '0'
provider: layout_builder
context_mapping:
entity: layout_builder.entity
view_mode: view_mode
formatter:
type: entity_reference_label
type: string
label: hidden
settings:
link: false
link_to_entity: false
third_party_settings:
field_formatter_class:
class: ''
weight: -6
class: su-spotlight-degrees
weight: -8
additional: { }
a704578a-b413-4b74-a71e-43967f0ba5cb:
uuid: a704578a-b413-4b74-a71e-43967f0ba5cb
63d93c8e-eb7c-44f1-9bed-188a48aabf70:
uuid: 63d93c8e-eb7c-44f1-9bed-188a48aabf70
region: spotlight_hero_text
configuration:
id: 'field_block:node:spotlight:su_spotlight_degrees'
label: Degrees
id: 'field_block:node:spotlight:title'
label: Name
label_display: '0'
provider: layout_builder
context_mapping:
entity: layout_builder.entity
view_mode: view_mode
formatter:
type: string
type: entity_title_heading
label: hidden
settings:
link_to_entity: false
tag: h1
third_party_settings:
field_formatter_class:
class: ''
weight: -7
weight: -9
additional: { }
756b83ac-6771-4e9e-8345-1ef0f54ef67c:
uuid: 756b83ac-6771-4e9e-8345-1ef0f54ef67c
90087c67-5f11-44a2-a588-839d2e2973fe:
uuid: 90087c67-5f11-44a2-a588-839d2e2973fe
region: spotlight_hero_text
configuration:
id: 'field_block:node:spotlight:su_spotlight_person_title'
label: 'Title of Individual'
id: 'field_block:node:spotlight:type'
label: 'Content type'
label_display: '0'
provider: layout_builder
context_mapping:
entity: layout_builder.entity
view_mode: view_mode
formatter:
type: string
type: entity_reference_label
label: hidden
settings:
link_to_entity: false
link: false
third_party_settings:
field_formatter_class:
class: su-spotlight-degrees
weight: -8
class: spotlight-banner-text__header
weight: -10
additional: { }
third_party_settings: { }
-
Expand All @@ -172,6 +172,26 @@ third_party_settings:
centered: centered-container
columns: flex-8-of-12
components:
4b652f44-9246-4499-affb-8e0d9cba4535:
uuid: 4b652f44-9246-4499-affb-8e0d9cba4535
region: main
configuration:
id: 'field_block:node:spotlight:body'
label: 'Spotlight Story'
label_display: '0'
provider: layout_builder
context_mapping:
entity: layout_builder.entity
view_mode: view_mode
formatter:
type: text_default
label: hidden
settings: { }
third_party_settings:
field_formatter_class:
class: ''
weight: -4
additional: { }
54aa6b91-104e-446c-9493-838e3d7d722b:
uuid: 54aa6b91-104e-446c-9493-838e3d7d722b
region: main
Expand All @@ -190,27 +210,45 @@ third_party_settings:
third_party_settings:
field_formatter_class:
class: ''
weight: -9
weight: -5
additional: { }
4b652f44-9246-4499-affb-8e0d9cba4535:
uuid: 4b652f44-9246-4499-affb-8e0d9cba4535
6a3b1b07-4925-458d-916c-d1c86531661f:
uuid: 6a3b1b07-4925-458d-916c-d1c86531661f
region: main
configuration:
id: 'field_block:node:spotlight:body'
label: 'Spotlight Story'
id: 'field_block:node:spotlight:created'
label: 'Authored on'
label_display: '0'
provider: layout_builder
context_mapping:
entity: layout_builder.entity
view_mode: view_mode
formatter:
type: text_default
type: timestamp
label: hidden
settings: { }
settings:
date_format: custom
custom_date_format: 'F j, Y'
timezone: ''
tooltip:
date_format: long
custom_date_format: ''
time_diff:
enabled: false
future_format: '@interval hence'
past_format: '@interval ago'
granularity: 2
refresh: 60
description: ''
third_party_settings:
empty_fields:
handler: nbsp
field_formatter_class:
class: ''
weight: -8
field_label:
label_value: ''
label_tag: span
weight: -6
additional: { }
third_party_settings: { }
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ function engineering_profile_helper_preprocess_spotlight_header_layout(&$vars) {

if (!empty($degrees) && !empty($department)) {
// We need to concat the values.
$degrees_text = $degrees['content'][0]['#context']['value'];
$department_text = $department['content'][0]['#plain_text'];
$degrees_text = $degrees['content'][0][0]['#context']['value'];
$department_text = $department['content'][0][0]['#plain_text'];
$final_value = $degrees_text . ', ' . $department_text;
$degrees['content'][0]['#context']['value'] = $final_value;
$degrees['content'][0][0]['#context']['value'] = $final_value;
// Get rid of the department field, since we now have this data in
// the Degrees field.
unset($spotlight_hero_text[$department_key]);
Expand Down

0 comments on commit ee3bb53

Please sign in to comment.