Skip to content

Commit

Permalink
Merge pull request #150 from parameter1/x
Browse files Browse the repository at this point in the history
Use email-x-render
  • Loading branch information
brandonbk authored Apr 28, 2024
2 parents 084fbe0 + 086ed46 commit ba98ddd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@parameter1/base-cms-image": "^4.47.1",
"@parameter1/base-cms-marko-core": "^4.54.2",
"@parameter1/base-cms-marko-newsletters": "^4.55.0",
"@parameter1/base-cms-marko-newsletters-email-x": "^4.50.0",
"@parameter1/base-cms-marko-newsletters-email-x": "^4.55.3",
"@parameter1/base-cms-marko-newsletters-gam": "^4.40.3",
"@parameter1/base-cms-marko-newsletters-native-x": "^4.52.0",
"@parameter1/base-cms-marko-newsletters-omail": "^4.5.12",
Expand Down
19 changes: 8 additions & 11 deletions tenants/multi/components/ad-unit.marko
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ $ const {

$ const { alias } = newsletter;

$ const { query } = req;
$ const esp = query.esp || config.get("defaultEsp");
$ const emailMergeVars = {
email: esp === "et" ? "%%emailaddr%%" : "@{delivery_email}@",
send: esp === "et" ? "%%jobid%%" : "@{track_id}@",
};

$ let adUnit;
$ if (gamEnabled) {
adUnit = GAM.getAdUnit({ name, alias, targeting: buildGAMTargeting({ newsletter, date, dateInfo }) });
Expand All @@ -36,10 +29,14 @@ $ if (gamEnabled) {
</marko-newsletters-gam-display>
</if>
<else>
<marko-newsletters-email-x-display decoded-params=["email", "send"]>
<marko-newsletters-email-x-data|{ response }| decoded-params=["email", "send"]>
<@ad-unit ...adUnit />
<@params date=date email=emailMergeVars.email send=emailMergeVars.send />
<@image class="scaleAd" />
</marko-newsletters-email-x-display>
<@params date=input.date email="@{delivery_email}@" send="@{track_id}@" include-advertiser=true />
<if(response)>
<marko-newsletters-email-x-render response=response>
<@image class="scaleAd" />
</marko-newsletters-email-x-render>
</if>
</marko-newsletters-email-x-data>
</else>
</if>
2 changes: 1 addition & 1 deletion tenants/multi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@industrial-media/common": "^2.1.0",
"@parameter1/base-cms-marko-core": "^4.54.2",
"@parameter1/base-cms-marko-newsletters": "^4.55.0",
"@parameter1/base-cms-marko-newsletters-email-x": "^4.50.0",
"@parameter1/base-cms-marko-newsletters-email-x": "^4.55.3",
"@parameter1/base-cms-marko-newsletters-gam": "^4.40.3",
"@parameter1/base-cms-marko-newsletters-native-x": "^4.52.0",
"@parameter1/base-cms-marko-web-native-x": "^4.54.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,10 @@
marko "~4.20.0"
pretty "^2.0.0"

"@parameter1/base-cms-marko-newsletters-email-x@^4.50.0":
version "4.50.0"
resolved "https://registry.yarnpkg.com/@parameter1/base-cms-marko-newsletters-email-x/-/base-cms-marko-newsletters-email-x-4.50.0.tgz#f01535be0d8aa658475484838da09b4092675dba"
integrity sha512-JNm+1Zt+zwOcwD+VuogljNznSmIxeXddTT/vuQ6x0CRl+rvowqf7vblCue92uVbnq9aP8pDROrZcaimJRWzgvQ==
"@parameter1/base-cms-marko-newsletters-email-x@^4.55.3":
version "4.55.3"
resolved "https://registry.yarnpkg.com/@parameter1/base-cms-marko-newsletters-email-x/-/base-cms-marko-newsletters-email-x-4.55.3.tgz#3ca98e3f7285fdb59da53fb97ec7c91c536ae628"
integrity sha512-tZjY+AyyZqU86ZCQ41kKNXWVuChZ717nNb1vbiUeyZ5lZwOMVx0jYp6FIjSCdjc25pB7PqKc0YnnionUmEZbtQ==
dependencies:
"@parameter1/base-cms-object-path" "^4.40.3"
"@parameter1/base-cms-utils" "^4.40.3"
Expand Down

0 comments on commit ba98ddd

Please sign in to comment.