Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRI-Espanol Issue #27 - trim length of link #334

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions modules/wri_homepage/wri_homepage.install
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}