From 4098832d8bf47e4cbb8787b63560419715f3fa69 Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Wed, 17 Jul 2024 22:39:37 -0600 Subject: [PATCH 1/9] SDSS-1299: new branch with just the view --- .../sync/views.view.explore_more_news.yml | 752 ++++++++++++++++++ 1 file changed, 752 insertions(+) create mode 100644 docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml new file mode 100644 index 000000000..39718e486 --- /dev/null +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml @@ -0,0 +1,752 @@ +uuid: 6bee2160-3fb2-4124-b681-990ef5b42804 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.stanford_card + - node.type.stanford_news + module: + - datetime + - node + - stanford_fields + - user +id: explore_more_news +label: 'Explore More News' +module: views +description: 'All content, of any content type, that is related to the current content' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: some + options: + offset: 0 + items_per_page: 3 + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + empty: { } + sorts: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: standard + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + arguments: + nid: + id: nid + table: node_field_data + field: nid + relationship: reverse__node__su_sdss_related_content + group_type: group + admin_label: '' + entity_type: node + entity_field: nid + plugin_id: node_nid + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: node + default_argument_options: { } + summary_options: + base_path: '' + count: true + override: false + items_per_page: 25 + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + style: + type: html_list + options: + row_class: '' + default_row_class: true + uses_fields: false + type: ul + wrapper_class: '' + class: 'su-list-unstyled grid-container-3' + row: + type: 'entity:node' + options: + relationship: none + view_mode: stanford_card + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + contextual_filters_or: false + relationships: + reverse__node__su_sdss_related_content: + id: reverse__node__su_sdss_related_content + table: node_field_data + field: reverse__node__su_sdss_related_content + relationship: none + group_type: group + admin_label: su_sdss_related_content + entity_type: node + plugin_id: entity_reverse + required: false + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - 'user.node_grants:view' + - user.permissions + tags: { } + explore_more_curated: + id: explore_more_curated + display_title: 'Explore More News - Curated' + display_plugin: viewfield_block + position: 1 + display_options: + display_extenders: { } + display_description: '3 items of Related News curated on the page' + allow: + items_per_page: items_per_page + filters: + status: + id: status + table: node_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: false + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: 0 + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: status + plugin_id: boolean + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + operator: in + value: + stanford_news: stanford_news + group: '1' + exposed: false + expose: + operator_id: false + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: 0 + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: type + plugin_id: bundle + defaults: + filters: false + filter_groups: false + sorts: false + arguments: false + empty: false + filter_groups: + operator: AND + groups: + 1: AND + sorts: + su_news_publishing_date_value: + id: su_news_publishing_date_value + table: node__su_news_publishing_date + field: su_news_publishing_date_value + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + field_identifier: '' + granularity: second + plugin_id: datetime + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + field_identifier: '' + entity_type: node + entity_field: title + plugin_id: standard + arguments: + nid: + id: nid + table: node_field_data + field: nid + relationship: reverse__node__su_sdss_related_content + group_type: group + admin_label: '' + default_action: default + exception: + value: all + title_enable: 0 + title: All + title_enable: 0 + title: '' + default_argument_type: node + default_argument_options: { } + summary_options: + base_path: '' + count: 1 + override: 0 + items_per_page: '25' + summary: + sort_order: asc + number_of_records: '0' + format: default_summary + specify_validation: 0 + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: 0 + not: 0 + entity_type: node + entity_field: nid + plugin_id: node_nid + empty: + view: + id: view + table: views + field: view + relationship: none + group_type: group + admin_label: '' + empty: true + view_to_insert: 'duplicate_of_related_content:explore_more_random' + inherit_arguments: 0 + plugin_id: view + block_description: 'Explore More News Related Content' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - 'user.node_grants:view' + - user.permissions + tags: { } + explore_more_other: + id: explore_more_other + display_title: 'Explore More News Using Other Relationships' + display_plugin: viewfield_block + position: 2 + display_options: + display_extenders: { } + display_description: 'This pulls three more news items from other sources' + allow: + items_per_page: items_per_page + filters: + status: + id: status + table: node_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: false + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: 0 + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: status + plugin_id: boolean + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + operator: in + value: + stanford_news: stanford_news + group: '1' + exposed: false + expose: + operator_id: false + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: 0 + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: type + plugin_id: bundle + defaults: + filters: false + filter_groups: false + relationships: false + arguments: false + sorts: false + filter_groups: + operator: AND + groups: + 1: AND + relationships: + su_sdss_related_content: + id: su_sdss_related_content + table: node__su_sdss_related_content + field: su_sdss_related_content + relationship: none + group_type: group + admin_label: 'su_sdss_related_content: Content' + required: 0 + plugin_id: standard + arguments: + nid: + id: nid + table: node_field_data + field: nid + relationship: su_sdss_related_content + group_type: group + admin_label: '' + default_action: default + exception: + value: all + title_enable: 0 + title: All + title_enable: 0 + title: '' + default_argument_type: node + default_argument_options: { } + summary_options: + base_path: '' + count: 1 + override: 0 + items_per_page: '25' + summary: + sort_order: asc + number_of_records: '0' + format: default_summary + specify_validation: 0 + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: 0 + not: 0 + entity_type: node + entity_field: nid + plugin_id: node_nid + sorts: + random: + id: random + table: views + field: random + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + field_identifier: '' + plugin_id: random + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - 'user.node_grants:view' + - user.permissions + tags: { } + explore_more_random: + id: explore_more_random + display_title: 'Random Three News Items' + display_plugin: viewfield_block + position: 3 + display_options: + display_extenders: { } + display_description: 'Super random!' + allow: + items_per_page: items_per_page + filters: + status: + id: status + table: node_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: false + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: 0 + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: status + plugin_id: boolean + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + operator: in + value: + stanford_news: stanford_news + group: '1' + exposed: false + expose: + operator_id: false + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: 0 + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: type + plugin_id: bundle + defaults: + filters: false + filter_groups: false + relationships: false + arguments: false + sorts: false + filter_groups: + operator: AND + groups: + 1: AND + relationships: { } + arguments: + nid: + id: nid + table: node_field_data + field: nid + relationship: none + group_type: group + admin_label: 'Exclude Current News Item' + default_action: default + exception: + value: all + title_enable: 0 + title: All + title_enable: 0 + title: '' + default_argument_type: node + default_argument_options: { } + summary_options: + base_path: '' + count: 1 + override: 0 + items_per_page: '25' + summary: + sort_order: asc + number_of_records: '0' + format: default_summary + specify_validation: 0 + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: 0 + not: 1 + entity_type: node + entity_field: nid + plugin_id: node_nid + sorts: + su_news_publishing_date_value: + id: su_news_publishing_date_value + table: node__su_news_publishing_date + field: su_news_publishing_date_value + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + field_identifier: '' + granularity: second + plugin_id: datetime + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + field_identifier: '' + entity_type: node + entity_field: title + plugin_id: standard + block_description: 'Random News Items (3)' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - 'user.node_grants:view' + - user.permissions + tags: { } From 32a201034d4e1541119340b5b7116adf96f5e855 Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Wed, 17 Jul 2024 22:56:49 -0600 Subject: [PATCH 2/9] SDSS-1299: adjustments to the view display names for ease of use --- .../sync/views.view.explore_more_news.yml | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml index 39718e486..d1a4de23c 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml @@ -209,7 +209,7 @@ display: tags: { } explore_more_curated: id: explore_more_curated - display_title: 'Explore More News - Curated' + display_title: 'Explore More News - News that is selected as related on this article' display_plugin: viewfield_block position: 1 display_options: @@ -376,18 +376,7 @@ display: entity_type: node entity_field: nid plugin_id: node_nid - empty: - view: - id: view - table: views - field: view - relationship: none - group_type: group - admin_label: '' - empty: true - view_to_insert: 'duplicate_of_related_content:explore_more_random' - inherit_arguments: 0 - plugin_id: view + empty: { } block_description: 'Explore More News Related Content' cache_metadata: max-age: -1 @@ -400,7 +389,7 @@ display: tags: { } explore_more_other: id: explore_more_other - display_title: 'Explore More News Using Other Relationships' + display_title: 'Explore More - News that has selected this article as related' display_plugin: viewfield_block position: 2 display_options: @@ -572,12 +561,12 @@ display: tags: { } explore_more_random: id: explore_more_random - display_title: 'Random Three News Items' + display_title: 'Explore More News - Three Random News Items' display_plugin: viewfield_block position: 3 display_options: display_extenders: { } - display_description: 'Super random!' + display_description: 'Super random' allow: items_per_page: items_per_page filters: From bc0c23e376cc8f8571e246953a9f8515fc2c0dd9 Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Wed, 17 Jul 2024 23:27:51 -0600 Subject: [PATCH 3/9] SDSS-1299: adding field --- ...orm_display.node.stanford_news.default.yml | 8 +++ ...lay.node.stanford_news.search_indexing.yml | 2 + ...splay.node.stanford_news.stanford_card.yml | 2 + ...view_display.node.stanford_news.teaser.yml | 2 + ...nford_news.su_sdss_explore_more_picker.yml | 68 +++++++++++++++++++ ...orage.node.su_sdss_explore_more_picker.yml | 21 ++++++ 6 files changed, 103 insertions(+) create mode 100644 docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml create mode 100644 docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_explore_more_picker.yml diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml index d8cbf3e5d..b39799cb7 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml @@ -15,6 +15,7 @@ dependencies: - field.field.node.stanford_news.su_news_publishing_date - field.field.node.stanford_news.su_news_source - field.field.node.stanford_news.su_news_topics + - field.field.node.stanford_news.su_sdss_explore_more_picker - field.field.node.stanford_news.su_sdss_import_source - field.field.node.stanford_news.su_sdss_media_contacts - field.field.node.stanford_news.su_sdss_media_mention @@ -41,6 +42,7 @@ dependencies: - scheduler - stanford_intranet - text + - viewfield third_party_settings: field_group: group_media: @@ -230,6 +232,12 @@ content: required_depth: 0 none_label: '- Please select -' third_party_settings: { } + su_sdss_explore_more_picker: + type: viewfield_select + weight: 55 + region: content + settings: { } + third_party_settings: { } su_sdss_media_contacts: type: inline_entity_form_complex weight: 12 diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.search_indexing.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.search_indexing.yml index 45ac659d4..aad2b26fc 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.search_indexing.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.search_indexing.yml @@ -16,6 +16,7 @@ dependencies: - field.field.node.stanford_news.su_news_publishing_date - field.field.node.stanford_news.su_news_source - field.field.node.stanford_news.su_news_topics + - field.field.node.stanford_news.su_sdss_explore_more_picker - field.field.node.stanford_news.su_sdss_import_source - field.field.node.stanford_news.su_sdss_media_contacts - field.field.node.stanford_news.su_sdss_media_mention @@ -135,6 +136,7 @@ hidden: stanford_intranet__access: true su_metatags: true su_news_dek: true + su_sdss_explore_more_picker: true su_sdss_import_source: true su_sdss_media_contacts: true su_sdss_media_mention: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.stanford_card.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.stanford_card.yml index f1f155574..fb45424c6 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.stanford_card.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.stanford_card.yml @@ -16,6 +16,7 @@ dependencies: - field.field.node.stanford_news.su_news_publishing_date - field.field.node.stanford_news.su_news_source - field.field.node.stanford_news.su_news_topics + - field.field.node.stanford_news.su_sdss_explore_more_picker - field.field.node.stanford_news.su_sdss_import_source - field.field.node.stanford_news.su_sdss_media_contacts - field.field.node.stanford_news.su_sdss_media_mention @@ -182,6 +183,7 @@ hidden: su_news_byline: true su_news_components: true su_news_dek: true + su_sdss_explore_more_picker: true su_sdss_import_source: true su_sdss_media_contacts: true su_sdss_media_mention: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.teaser.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.teaser.yml index 9cb6c98e6..abbe6896c 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.teaser.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.teaser.yml @@ -16,6 +16,7 @@ dependencies: - field.field.node.stanford_news.su_news_publishing_date - field.field.node.stanford_news.su_news_source - field.field.node.stanford_news.su_news_topics + - field.field.node.stanford_news.su_sdss_explore_more_picker - field.field.node.stanford_news.su_sdss_import_source - field.field.node.stanford_news.su_sdss_media_contacts - field.field.node.stanford_news.su_sdss_media_mention @@ -221,6 +222,7 @@ hidden: su_news_publishing_date: true su_news_source: true su_news_topics: true + su_sdss_explore_more_picker: true su_sdss_import_source: true su_sdss_media_contacts: true su_sdss_media_mention: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml new file mode 100644 index 000000000..c26e71f82 --- /dev/null +++ b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml @@ -0,0 +1,68 @@ +uuid: f86e1b21-0346-4fcf-b334-e645dc57a7ca +langcode: en +status: true +dependencies: + config: + - field.storage.node.su_sdss_explore_more_picker + - node.type.stanford_news + module: + - viewfield +id: node.stanford_news.su_sdss_explore_more_picker +field_name: su_sdss_explore_more_picker +entity_type: node +bundle: stanford_news +label: 'Options for Explore More' +description: 'Use this field to select how to populate the Explore More section at the bottom of the page. By default, the view will show 3 random articles.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + force_default: false + allowed_views: + explore_more_news: explore_more_news + stanford_shared_tags: '0' + stanford_basic_pages: '0' + su_block_edit_links: '0' + change_logs: '0' + content: '0' + block_content: '0' + stanford_courses: '0' + editoria11y_dismissals: '0' + editoria11y_results: '0' + stanford_events: '0' + stanford_events_past: '0' + stanford_events_schedule: '0' + stanford_event_series: '0' + events_feeds: '0' + events_this_week: '0' + authmap: '0' + files: '0' + locked_content: '0' + sdss_manage_content_bytype: '0' + media: '0' + media_library: '0' + stanford_news: '0' + news_research_search: '0' + stanford_person: '0' + policies: '0' + stanford_publications: '0' + redirect: '0' + rss_feeds: '0' + samlauth_map: '0' + sdss_news_sharing: '0' + search: '0' + taxonomy_term_pages: '0' + user_admin_people: '0' + allowed_display_types: + block: block + viewfield_block: viewfield_block + default: '0' + feed: '0' + page: '0' + rest_export: '0' + handler: 'default:view' + handler_settings: + target_bundles: null + auto_create: false +field_type: viewfield diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_explore_more_picker.yml b/docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_explore_more_picker.yml new file mode 100644 index 000000000..342e6c380 --- /dev/null +++ b/docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_explore_more_picker.yml @@ -0,0 +1,21 @@ +uuid: 9155d083-6b96-4d35-acbe-455ee1b17e2c +langcode: en +status: true +dependencies: + module: + - node + - viewfield + - views +id: node.su_sdss_explore_more_picker +field_name: su_sdss_explore_more_picker +entity_type: node +type: viewfield +settings: + target_type: view +module: viewfield +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false From d25507658fb77c4ea6c855ebd9245f582d87febb Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Thu, 18 Jul 2024 12:05:58 -0600 Subject: [PATCH 4/9] SDSS-1299: adding field to the layout --- ...iew_display.node.stanford_news.default.yml | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml index 5d6f42b77..ae98c58b4 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml @@ -16,6 +16,7 @@ dependencies: - field.field.node.stanford_news.su_news_publishing_date - field.field.node.stanford_news.su_news_source - field.field.node.stanford_news.su_news_topics + - field.field.node.stanford_news.su_sdss_explore_more_picker - field.field.node.stanford_news.su_sdss_import_source - field.field.node.stanford_news.su_sdss_media_contacts - field.field.node.stanford_news.su_sdss_media_mention @@ -323,17 +324,29 @@ third_party_settings: centered: centered-container columns: flex-12-of-12 components: - 6b464e2e-34de-472f-8efb-a0137690ae40: - uuid: 6b464e2e-34de-472f-8efb-a0137690ae40 + 5097835f-3373-42fd-9027-da8e1b253b40: + uuid: 5097835f-3373-42fd-9027-da8e1b253b40 region: main configuration: - id: 'views_block:stanford_news-viewfield_block_1' + id: 'field_block:node:stanford_news:su_sdss_explore_more_picker' label: 'Explore More' label_display: visible - provider: views - context_mapping: { } - views_label: 'Explore More' - items_per_page: none + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: viewfield_default + label: hidden + settings: + view_title: hidden + always_build_output: false + empty_view_title: hidden + third_party_settings: + empty_fields: + handler: '' + field_formatter_class: + class: '' weight: 0 additional: { } third_party_settings: { } @@ -625,4 +638,5 @@ hidden: stanford_intranet__access: true su_metatags: true su_news_source: true + su_sdss_explore_more_picker: true su_shared_tags: true From b08233ffcfe8cdfb18a4b879809f8c7fe569b46f Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Thu, 18 Jul 2024 13:43:35 -0600 Subject: [PATCH 5/9] SDSS-1299: cleaned up form and set default --- ...orm_display.node.stanford_news.default.yml | 51 +++++++++---------- ...nford_news.su_sdss_explore_more_picker.yml | 10 +++- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml index b39799cb7..e1d36a87a 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_news.default.yml @@ -101,7 +101,7 @@ third_party_settings: label: Taxonomy region: content parent_name: '' - weight: 6 + weight: 7 format_type: details format_settings: classes: '' @@ -112,12 +112,13 @@ third_party_settings: required_fields: true group_related_content: children: - - su_sdss_person_ref - su_sdss_related_content - label: 'Related Fields' + - su_sdss_explore_more_picker + - su_sdss_person_ref + label: 'Related Content' region: content parent_name: '' - weight: 3 + weight: 6 format_type: details format_settings: classes: '' @@ -133,31 +134,31 @@ mode: default content: publish_on: type: datetime_timestamp_no_default - weight: 11 + weight: 12 region: content settings: { } third_party_settings: { } scheduler_settings: - weight: 10 + weight: 11 region: content settings: { } third_party_settings: { } stanford_intranet__access: type: entity_access - weight: 8 + weight: 9 region: content settings: { } third_party_settings: { } status: type: boolean_checkbox - weight: 7 + weight: 8 region: content settings: display_label: true third_party_settings: { } su_metatags: type: metatag_firehose - weight: 9 + weight: 10 region: content settings: sidebar: true @@ -188,10 +189,12 @@ content: third_party_settings: { } su_news_components: type: layout_paragraphs - weight: 4 + weight: 3 region: content settings: + view_mode: default preview_view_mode: default + form_display_mode: default nesting_depth: 0 require_layouts: 1 empty_message: '' @@ -221,7 +224,7 @@ content: third_party_settings: { } su_news_topics: type: cshs - weight: 11 + weight: 17 region: content settings: save_lineage: false @@ -234,13 +237,13 @@ content: third_party_settings: { } su_sdss_explore_more_picker: type: viewfield_select - weight: 55 + weight: 23 region: content settings: { } third_party_settings: { } su_sdss_media_contacts: type: inline_entity_form_complex - weight: 12 + weight: 4 region: content settings: form_mode: default @@ -255,14 +258,6 @@ content: collapsed: false revision: false removed_reference: keep - auto_open: true - allow_edit: true - hide_fieldset: false - hide_title: false - config_labels_button: _none - labels: { } - add_existing_widget: autocomplete - auto_open_edit_form: false third_party_settings: change_labels: add_another: 'Add another Media Contact' @@ -271,7 +266,7 @@ content: force_single_cardinality: 0 su_sdss_media_mention: type: boolean_checkbox - weight: 13 + weight: 5 region: content settings: display_label: true @@ -294,7 +289,7 @@ content: third_party_settings: { } su_sdss_news_focal_areas: type: cshs - weight: 15 + weight: 20 region: content settings: save_lineage: false @@ -317,7 +312,7 @@ content: third_party_settings: { } su_sdss_news_organization: type: cshs - weight: 13 + weight: 18 region: content settings: save_lineage: false @@ -330,7 +325,7 @@ content: third_party_settings: { } su_sdss_news_research_area: type: cshs - weight: 14 + weight: 19 region: content settings: save_lineage: false @@ -343,7 +338,7 @@ content: third_party_settings: { } su_sdss_person_ref: type: entity_reference_autocomplete - weight: 21 + weight: 25 region: content settings: match_operator: CONTAINS @@ -363,7 +358,7 @@ content: third_party_settings: { } su_shared_tags: type: cshs - weight: 9 + weight: 16 region: content settings: save_lineage: false @@ -376,7 +371,7 @@ content: third_party_settings: { } syndication: type: boolean_checkbox - weight: 54 + weight: 13 region: content settings: display_label: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml index c26e71f82..8434a8790 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml @@ -5,6 +5,7 @@ dependencies: config: - field.storage.node.su_sdss_explore_more_picker - node.type.stanford_news + - views.view.explore_more_news module: - viewfield id: node.stanford_news.su_sdss_explore_more_picker @@ -15,7 +16,12 @@ label: 'Options for Explore More' description: 'Use this field to select how to populate the Explore More section at the bottom of the page. By default, the view will show 3 random articles.' required: false translatable: false -default_value: { } +default_value: + - + target_uuid: 6bee2160-3fb2-4124-b681-990ef5b42804 + display_id: explore_more_random + arguments: '' + items_to_display: '' default_value_callback: '' settings: force_default: false @@ -55,8 +61,8 @@ settings: taxonomy_term_pages: '0' user_admin_people: '0' allowed_display_types: - block: block viewfield_block: viewfield_block + block: '0' default: '0' feed: '0' page: '0' From 8f941847d2936b0505cfba41e24960299b61d663 Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Thu, 18 Jul 2024 18:36:38 -0600 Subject: [PATCH 6/9] SDSS-1299: fixed issue with randomization --- .../sync/views.view.explore_more_news.yml | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml index d1a4de23c..3a90b9588 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml @@ -347,7 +347,7 @@ display: field: nid relationship: reverse__node__su_sdss_related_content group_type: group - admin_label: '' + admin_label: 'Exclude Current News Item' default_action: default exception: value: all @@ -507,7 +507,7 @@ display: field: nid relationship: su_sdss_related_content group_type: group - admin_label: '' + admin_label: 'Exclude Current News Item' default_action: default exception: value: all @@ -537,10 +537,24 @@ display: entity_field: nid plugin_id: node_nid sorts: - random: - id: random - table: views - field: random + su_news_publishing_date_value: + id: su_news_publishing_date_value + table: node__su_news_publishing_date + field: su_news_publishing_date_value + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + field_identifier: '' + granularity: second + plugin_id: datetime + title: + id: title + table: node_field_data + field: title relationship: none group_type: group admin_label: '' @@ -549,9 +563,11 @@ display: expose: label: '' field_identifier: '' - plugin_id: random + entity_type: node + entity_field: title + plugin_id: standard cache_metadata: - max-age: 0 + max-age: -1 contexts: - 'languages:language_content' - 'languages:language_interface' @@ -561,7 +577,7 @@ display: tags: { } explore_more_random: id: explore_more_random - display_title: 'Explore More News - Three Random News Items' + display_title: 'Explore More News - Random' display_plugin: viewfield_block position: 3 display_options: @@ -700,24 +716,10 @@ display: entity_field: nid plugin_id: node_nid sorts: - su_news_publishing_date_value: - id: su_news_publishing_date_value - table: node__su_news_publishing_date - field: su_news_publishing_date_value - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - field_identifier: '' - granularity: second - plugin_id: datetime - title: - id: title - table: node_field_data - field: title + random: + id: random + table: views + field: random relationship: none group_type: group admin_label: '' @@ -726,12 +728,10 @@ display: expose: label: '' field_identifier: '' - entity_type: node - entity_field: title - plugin_id: standard + plugin_id: random block_description: 'Random News Items (3)' cache_metadata: - max-age: -1 + max-age: 0 contexts: - 'languages:language_content' - 'languages:language_interface' From ad1d74ff969d63ede9a495e2a3a04cb91a7d0b85 Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Fri, 23 Aug 2024 13:01:11 -0600 Subject: [PATCH 7/9] SDSS-1299-explore-more-field --- ...re.entity_view_display.node.stanford_news.default.yml | 6 +++--- .../config/sync/views.view.explore_more_news.yml | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml index ccc106b5c..1a8f9f21d 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml @@ -6,7 +6,6 @@ dependencies: - core.base_field_override.node.stanford_news.title - field.field.node.stanford_news.layout_builder__layout - field.field.node.stanford_news.stanford_intranet__access - - field.field.node.stanford_news.su_sdss_imported_news_sharing - field.field.node.stanford_news.su_metatags - field.field.node.stanford_news.su_news_banner - field.field.node.stanford_news.su_news_banner_media_caption @@ -19,6 +18,7 @@ dependencies: - field.field.node.stanford_news.su_news_topics - field.field.node.stanford_news.su_sdss_explore_more_picker - field.field.node.stanford_news.su_sdss_import_source + - field.field.node.stanford_news.su_sdss_imported_news_sharing - field.field.node.stanford_news.su_sdss_media_contacts - field.field.node.stanford_news.su_sdss_media_mention - field.field.node.stanford_news.su_sdss_news_banner_caption @@ -331,7 +331,7 @@ third_party_settings: configuration: id: 'field_block:node:stanford_news:su_sdss_explore_more_picker' label: 'Explore More' - label_display: visible + label_display: '0' provider: layout_builder context_mapping: entity: layout_builder.entity @@ -340,7 +340,7 @@ third_party_settings: type: viewfield_default label: hidden settings: - view_title: hidden + view_title: above always_build_output: false empty_view_title: hidden third_party_settings: diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml index 3a90b9588..94cf599c3 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml @@ -24,6 +24,7 @@ display: display_plugin: default position: 0 display_options: + title: 'Explore More' fields: title: id: title @@ -209,12 +210,12 @@ display: tags: { } explore_more_curated: id: explore_more_curated - display_title: 'Explore More News - News that is selected as related on this article' + display_title: 'Explore More News - Use related content selections' display_plugin: viewfield_block position: 1 display_options: display_extenders: { } - display_description: '3 items of Related News curated on the page' + display_description: 'This pulls three news items from the Related Content field on this news article' allow: items_per_page: items_per_page filters: @@ -389,12 +390,12 @@ display: tags: { } explore_more_other: id: explore_more_other - display_title: 'Explore More - News that has selected this article as related' + display_title: 'Explore More News - Show articles that have selected this article' display_plugin: viewfield_block position: 2 display_options: display_extenders: { } - display_description: 'This pulls three more news items from other sources' + display_description: 'This pulls three news items that have have selected this news article as related content' allow: items_per_page: items_per_page filters: From f2b34db6be16b95835ad8adcffe54d44b551fb34 Mon Sep 17 00:00:00 2001 From: Dena DeBry Date: Mon, 26 Aug 2024 10:58:58 -0600 Subject: [PATCH 8/9] SDSS-1299: fixup of title --- ...view_display.node.stanford_news.default.yml | 2 +- .../sync/views.view.explore_more_news.yml | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml index 1a8f9f21d..c7f6d2a16 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml @@ -340,7 +340,7 @@ third_party_settings: type: viewfield_default label: hidden settings: - view_title: above + view_title: hidden always_build_output: false empty_view_title: hidden third_party_settings: diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml index 94cf599c3..7f3c973f3 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml @@ -196,7 +196,20 @@ display: entity_type: node plugin_id: entity_reverse required: false - header: { } + header: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: false + content: + value: '

Explore More

' + format: stanford_html + tokenize: false footer: { } display_extenders: { } cache_metadata: @@ -379,6 +392,7 @@ display: plugin_id: node_nid empty: { } block_description: 'Explore More News Related Content' + block_hide_empty: 1 cache_metadata: max-age: -1 contexts: @@ -567,6 +581,7 @@ display: entity_type: node entity_field: title plugin_id: standard + block_hide_empty: 1 cache_metadata: max-age: -1 contexts: @@ -731,6 +746,7 @@ display: field_identifier: '' plugin_id: random block_description: 'Random News Items (3)' + block_hide_empty: 1 cache_metadata: max-age: 0 contexts: From 17242745a2423da21de9495ffaf8408a7d65aa44 Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 28 Aug 2024 19:33:37 +0000 Subject: [PATCH 9/9] Configuration changes. --- ...iew_display.node.stanford_news.default.yml | 4 +- ...nford_news.su_sdss_explore_more_picker.yml | 4 +- .../sync/views.view.explore_more_news.yml | 55 +++++++++++-------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml index c7f6d2a16..57fb7da78 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_news.default.yml @@ -331,7 +331,7 @@ third_party_settings: configuration: id: 'field_block:node:stanford_news:su_sdss_explore_more_picker' label: 'Explore More' - label_display: '0' + label_display: visible provider: layout_builder context_mapping: entity: layout_builder.entity @@ -341,7 +341,7 @@ third_party_settings: label: hidden settings: view_title: hidden - always_build_output: false + always_build_output: true empty_view_title: hidden third_party_settings: empty_fields: diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml index 8434a8790..f91fa32ba 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_news.su_sdss_explore_more_picker.yml @@ -13,8 +13,8 @@ field_name: su_sdss_explore_more_picker entity_type: node bundle: stanford_news label: 'Options for Explore More' -description: 'Use this field to select how to populate the Explore More section at the bottom of the page. By default, the view will show 3 random articles.' -required: false +description: 'Use this field to select how to populate the Explore More section at the bottom of the page. By default, the view will show 3 random articles. Only News will be displayed in Explore More.' +required: true translatable: false default_value: - diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml index 7f3c973f3..126f2bf1a 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.explore_more_news.yml @@ -95,7 +95,20 @@ display: cache: type: tag options: { } - empty: { } + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: 'No additional news items available.' + format: stanford_html + tokenize: false sorts: title: id: title @@ -195,21 +208,8 @@ display: admin_label: su_sdss_related_content entity_type: node plugin_id: entity_reverse - required: false - header: - area: - id: area - table: views - field: area - relationship: none - group_type: group - admin_label: '' - plugin_id: text - empty: false - content: - value: '

Explore More

' - format: stanford_html - tokenize: false + required: true + header: { } footer: { } display_extenders: { } cache_metadata: @@ -230,7 +230,7 @@ display: display_extenders: { } display_description: 'This pulls three news items from the Related Content field on this news article' allow: - items_per_page: items_per_page + items_per_page: 0 filters: status: id: status @@ -319,7 +319,8 @@ display: filter_groups: false sorts: false arguments: false - empty: false + empty: true + relationships: false filter_groups: operator: AND groups: @@ -390,9 +391,19 @@ display: entity_type: node entity_field: nid plugin_id: node_nid - empty: { } block_description: 'Explore More News Related Content' block_hide_empty: 1 + relationships: + reverse__node__su_sdss_related_content: + id: reverse__node__su_sdss_related_content + table: node_field_data + field: reverse__node__su_sdss_related_content + relationship: none + group_type: group + admin_label: su_sdss_related_content + required: 1 + entity_type: node + plugin_id: entity_reverse cache_metadata: max-age: -1 contexts: @@ -411,7 +422,7 @@ display: display_extenders: { } display_description: 'This pulls three news items that have have selected this news article as related content' allow: - items_per_page: items_per_page + items_per_page: 0 filters: status: id: status @@ -513,7 +524,7 @@ display: relationship: none group_type: group admin_label: 'su_sdss_related_content: Content' - required: 0 + required: 1 plugin_id: standard arguments: nid: @@ -600,7 +611,7 @@ display: display_extenders: { } display_description: 'Super random' allow: - items_per_page: items_per_page + items_per_page: 0 filters: status: id: status