diff --git a/modules/wri_homepage/config/install/core.entity_view_display.paragraph.featured_statement.preview.yml b/modules/wri_homepage/config/install/core.entity_view_display.paragraph.featured_statement.preview.yml new file mode 100644 index 000000000..8745aa84c --- /dev/null +++ b/modules/wri_homepage/config/install/core.entity_view_display.paragraph.featured_statement.preview.yml @@ -0,0 +1,93 @@ +langcode: es +status: true +dependencies: + config: + - core.entity_view_mode.paragraph.preview + - field.field.paragraph.featured_statement.field_link + - field.field.paragraph.featured_statement.field_text + - field.field.paragraph.featured_statement.field_title + - field.field.paragraph.featured_statement.field_updated + - paragraphs.paragraphs_type.featured_statement + module: + - ds + - layout_builder + - link +third_party_settings: + layout_builder: + enabled: false + allow_custom: false +id: paragraph.featured_statement.preview +targetEntityType: paragraph +bundle: featured_statement +mode: preview +content: + field_link: + type: link + label: hidden + settings: + trim_length: 20 + url_only: true + url_plain: true + rel: '0' + target: '0' + third_party_settings: { } + weight: 3 + region: content + field_text: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: + ds: + ft: + id: minimal + settings: + lb: '' + lb-col: false + classes: { } + weight: 2 + region: content + field_title: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: + ds: + ft: + id: minimal + settings: + lb: '' + lb-col: false + classes: { } + weight: 1 + region: content + field_updated: + type: timestamp + label: hidden + settings: + date_format: custom + custom_date_format: 'F d, Y' + timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + third_party_settings: + ds: + ft: + id: minimal + settings: + lb: '' + lb-col: false + classes: { } + weight: 0 + region: content +hidden: + search_api_excerpt: true diff --git a/modules/wri_homepage/wri_homepage.install b/modules/wri_homepage/wri_homepage.install index 1ccc86b51..fce801f72 100644 --- a/modules/wri_homepage/wri_homepage.install +++ b/modules/wri_homepage/wri_homepage.install @@ -27,3 +27,15 @@ function wri_homepage_update_dependencies() { return $dependencies; } + + +/** + * Update the Featured Statement paragraph to have a preview mode. + */ +function wri_homepage_update_10001() { + + \Drupal::service('distro_helper.updates')->installConfig('core.entity_view_display.paragraph.featured_statement.preview', 'wri_homepage', 'install', 'TRUE'); + + $message = 'Add Preview mode for Featured Statement paragraph'; + return $message; +}