Skip to content

Commit

Permalink
Use entity display instead of fields for people view
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jun 29, 2023
1 parent 6fc8513 commit 1783a7b
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ dependencies:
config:
- core.entity_view_mode.node.stanford_card
- field.field.node.stanford_person.body
- field.field.node.stanford_person.field_menulink
- field.field.node.stanford_person.layout_builder__layout
- field.field.node.stanford_person.stanford_intranet__access
- field.field.node.stanford_person.su_metatags
- field.field.node.stanford_person.su_person_academic_appt
- field.field.node.stanford_person.su_person_admin_appts
- field.field.node.stanford_person.su_person_affiliations
Expand All @@ -25,6 +27,7 @@ dependencies:
- field.field.node.stanford_person.su_person_mobile_phone
- field.field.node.stanford_person.su_person_photo
- field.field.node.stanford_person.su_person_profile_link
- field.field.node.stanford_person.su_person_pronouns
- field.field.node.stanford_person.su_person_research
- field.field.node.stanford_person.su_person_research_interests
- field.field.node.stanford_person.su_person_scholarly_interests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.stanford_person.body
- field.field.node.stanford_person.field_menulink
- field.field.node.stanford_person.layout_builder__layout
- field.field.node.stanford_person.stanford_intranet__access
- field.field.node.stanford_person.su_metatags
- field.field.node.stanford_person.su_person_academic_appt
- field.field.node.stanford_person.su_person_admin_appts
- field.field.node.stanford_person.su_person_affiliations
Expand All @@ -25,6 +27,7 @@ dependencies:
- field.field.node.stanford_person.su_person_mobile_phone
- field.field.node.stanford_person.su_person_photo
- field.field.node.stanford_person.su_person_profile_link
- field.field.node.stanford_person.su_person_pronouns
- field.field.node.stanford_person.su_person_research
- field.field.node.stanford_person.su_person_research_interests
- field.field.node.stanford_person.su_person_scholarly_interests
Expand All @@ -34,29 +37,72 @@ dependencies:
- field.field.node.stanford_person.su_shared_tags
- node.type.stanford_person
module:
- text
- ds
- empty_fields
- field_formatter_class
- stanford_media
- user
third_party_settings:
ds:
layout:
id: pattern_card
library: null
disable_css: false
entity_classes: all_classes
settings:
pattern:
field_templates: default
variant: minimal
regions:
card_image:
- su_person_photo
card_headline:
- node_title
card_body:
- su_person_short_title
fields:
node_title:
plugin_id: node_title
weight: 1
label: hidden
formatter: default
settings:
link: true
wrapper: ''
class: ''
id: node.stanford_person.teaser
targetEntityType: node
bundle: stanford_person
mode: teaser
content:
body:
type: text_summary_or_trimmed
su_person_photo:
type: media_responsive_image_formatter
label: hidden
settings:
trim_length: 600
third_party_settings: { }
weight: 101
region: content
links:
settings: { }
view_mode: default
link: false
image_style: responsive_1_1
remove_alt: '1'
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
weight: 0
region: card_image
su_person_short_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 100
region: content
weight: 2
region: card_body
hidden:
body: true
field_menulink: true
layout_builder__layout: true
links: true
search_api_excerpt: true
stanford_intranet__access: true
su_metatags: true
Expand All @@ -76,13 +122,11 @@ hidden:
su_person_mail_code: true
su_person_map_url: true
su_person_mobile_phone: true
su_person_photo: true
su_person_profile_link: true
su_person_pronouns: true
su_person_research: true
su_person_research_interests: true
su_person_scholarly_interests: true
su_person_short_title: true
su_person_telephone: true
su_person_type_group: true
su_shared_tags: true
35 changes: 17 additions & 18 deletions config/sync/views.view.stanford_person.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.storage.node.su_person_photo
- field.storage.node.su_person_short_title
- field.storage.node.su_person_type_group
Expand Down Expand Up @@ -551,12 +552,10 @@ display:
wrapper_class: ''
class: 'su-list-unstyled grid-container-3'
row:
type: fields
type: 'entity:node'
options:
default_field_elements: true
inline: { }
separator: ''
hide_empty: true
relationship: none
view_mode: teaser
query:
type: views_query
options:
Expand Down Expand Up @@ -700,12 +699,12 @@ display:
group_type: group
admin_label: ''
label: ''
exclude: 1
exclude: 0
alter:
alter_text: 0
text: ''
make_link: 0
path: ''
make_link: 1
path: '{{ view_node }}'
absolute: 0
external: 0
replace_spaces: 0
Expand All @@ -729,7 +728,7 @@ display:
preserve_tags: ''
html: 0
element_type: ''
element_class: ''
element_class: views-field-title
element_label_type: ''
element_label_class: ''
element_label_colon: false
Expand Down Expand Up @@ -768,10 +767,10 @@ display:
label: ''
exclude: 0
alter:
alter_text: 1
text: "{{ su_person_photo }}\r\n{{ title }}"
make_link: 1
path: '{{ view_node }}'
alter_text: 0
text: ''
make_link: 0
path: ''
absolute: 0
external: 0
replace_spaces: 0
Expand All @@ -794,22 +793,22 @@ display:
trim: 0
preserve_tags: ''
html: 0
element_type: div
element_type: h2
element_class: ''
element_label_type: div
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: div
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: 1
empty: ''
hide_empty: 0
empty_zero: 0
hide_alter_empty: 1
click_sort_column: value
type: entity_title_heading
type: string
settings:
tag: h2
link_to_entity: 1
group_column: value
group_columns: { }
group_rows: true
Expand Down

0 comments on commit 1783a7b

Please sign in to comment.