Skip to content

Commit

Permalink
Set a fallback value of company if Mindful advertiser isn’t found
Browse files Browse the repository at this point in the history
  • Loading branch information
jwade1327 committed Sep 24, 2024
1 parent 51139c0 commit b1253c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/common/components/blocks/content/list-item.marko
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";
import buildLinkUrl from '@science-medicine-group/package-common/utils/build-link-url';

$ const { content, ctaLinkStyle, advertiser } = input;
$ const company = (advertiser) ? advertiser : content.company;
$ const creativeId = get(input, "mindfulCreativeId");
$ const tenant = get(input, "mindfulTenant");
$ const url = buildLinkUrl(content.siteContext.url);
Expand Down Expand Up @@ -78,7 +79,7 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs };
<tr>
<td align="left" valign="top" style=sponsoredTagStyle>${tag}</td>
<td align="right" width="200">
<marko-core-obj-value|{ value: image }| obj=content.company field="primaryImage" as="object">
<marko-core-obj-value|{ value: image }| obj=company field="primaryImage" as="object">
<marko-newsletter-imgix
src=image.src
alt=image.alt
Expand Down

0 comments on commit b1253c8

Please sign in to comment.