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

Closes #3228: Change featured image to thumbnail image in Marketing Cloud layouts #3847

Merged
merged 2 commits into from
Nov 6, 2024
Merged
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
Expand Up @@ -138,7 +138,10 @@ function az_marketing_cloud_preprocess_node__view__az_marketing_cloud(&$variable
$az_canonical_absolute_url = $az_canonical_url_object->setAbsolute()->toString();
$variables['az_canonical_url'] = $az_canonical_absolute_url;
$variables['az_canonical_summary_link_title'] = $token_service->replace('[node:az-canonical-summary-link-title]', ['node' => $node], [], $bubbleable_metadata);
$media = $node->field_az_media_image->entity ?? NULL;
$media = $node->field_az_media_thumbnail_image->entity ?? NULL;
if (empty($media)) {
$media = $node->field_az_media_image->entity ?? NULL;
}
$file = $media->field_media_az_image->entity ?? NULL;
if (!empty($file)) {
$uri = $file->getFileUri();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ content:
third_party_settings: { }
weight: 3
region: content
field_az_media_image:
field_az_media_thumbnail_image:
type: entity_reference_label
label: hidden
settings:
Expand Down Expand Up @@ -78,7 +78,7 @@ hidden:
field_az_expiration_date: true
field_az_featured_image_as_thumb: true
field_az_main_content: true
field_az_media_thumbnail_image: true
field_az_media_image: true
field_az_metatag: true
field_az_news_tags: true
field_az_published: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ content:
third_party_settings: { }
weight: 3
region: content
field_az_media_image:
field_az_media_thumbnail_image:
type: entity_reference_label
label: hidden
settings:
Expand Down Expand Up @@ -78,7 +78,7 @@ hidden:
field_az_expiration_date: true
field_az_featured_image_as_thumb: true
field_az_main_content: true
field_az_media_thumbnail_image: true
field_az_media_image: true
field_az_metatag: true
field_az_news_tags: true
field_az_published: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ content:
third_party_settings: { }
weight: 3
region: content
field_az_media_image:
field_az_media_thumbnail_image:
type: entity_reference_label
label: hidden
settings:
Expand Down Expand Up @@ -78,7 +78,7 @@ hidden:
field_az_expiration_date: true
field_az_featured_image_as_thumb: true
field_az_main_content: true
field_az_media_thumbnail_image: true
field_az_media_image: true
field_az_metatag: true
field_az_news_tags: true
field_az_published: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ content:
third_party_settings: { }
weight: 3
region: content
field_az_media_image:
field_az_media_thumbnail_image:
type: entity_reference_label
label: hidden
settings:
Expand Down Expand Up @@ -78,7 +78,7 @@ hidden:
field_az_expiration_date: true
field_az_featured_image_as_thumb: true
field_az_main_content: true
field_az_media_thumbnail_image: true
field_az_media_image: true
field_az_metatag: true
field_az_news_tags: true
field_az_published: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ content:
third_party_settings: { }
weight: 3
region: content
field_az_media_image:
field_az_media_thumbnail_image:
type: entity_reference_label
label: hidden
settings:
Expand Down Expand Up @@ -78,7 +78,7 @@ hidden:
field_az_expiration_date: true
field_az_featured_image_as_thumb: true
field_az_main_content: true
field_az_media_thumbnail_image: true
field_az_media_image: true
field_az_metatag: true
field_az_news_tags: true
field_az_published: true
Expand Down