Skip to content

Commit

Permalink
Closes #3228: Change featured image to thumbnail image in Marketing C…
Browse files Browse the repository at this point in the history
…loud layouts (#3847)
  • Loading branch information
danahertzberg authored Nov 6, 2024
1 parent 906fe14 commit 9266c51
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
5 changes: 4 additions & 1 deletion modules/custom/az_marketing_cloud/az_marketing_cloud.module
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

0 comments on commit 9266c51

Please sign in to comment.