This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body style="font-family:sans-serif"> | |
<a href="%%profile_center_url%%">Base - Profile/Preference Center</a> | |
<br/><a href="%%subscription_center_url%%">Base - Subscription Center</a> | |
<br/><a href="%%unsub_center_url%%">Base - One-Click Unsubscribe</a> | |
<br/><a href='%%=MicrositeURL(111111,"subscriberMID", "88888888")=%%'>Custom Profile/Preference Center</a> | |
<br/><a href='%%=MicrositeURL(222222,"subscriberMID", "88888888")=%%'>Custom Subscription Center</a> | |
<br/><a href='%%=MicrositeURL(333333,"subscriberMID", "88888888")=%%'>One-Click Unsubscribe</a> | |
<p>This email was sent by: | |
<b>%%Member_Busname%%</b> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @DEColumn1, @lookupValue | |
set @lookupValue = AttributeValue("lookupField") /* value from attribute or DE column in send context */ | |
set @lookupValue = "whoa" /* or a literal value */ | |
set @DEColumn1 = Lookup("DataExtensionName", "DEColumn1", "LookupColumn", @lookupValue) | |
]%% | |
DEColumn1 is %%=v(@DEColumn1)=%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @rows, @row, @rowCount | |
var @lookupValue | |
set @lookupValue = AttributeValue("lookupField") /* value from attribute or DE column in send context */ | |
set @lookupValue = "whee" /* or a literal value */ | |
set @rows = LookupRows("DataExtensionName","LookupColumn", @lookupValue) | |
set @rowCount = rowcount(@rows) | |
if @rowCount > 0 then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @rows, @row, @rowCount, @numRowsToReturn, @lookupValue, @i | |
set @lookupValue = AttributeValue("lookupField") /* value from attribute or DE column in send context */ | |
set @lookupValue = "whee" /* or a literal value */ | |
set @numRowsToReturn = 0 /* 0 means all, max 2000 */ | |
set @rows = LookupOrderedRows("DataExtensionName",@numRowsToReturn,"DEColumn1 desc, DEColumn2 asc","LookupColumn", @lookupValue) | |
set @rowCount = rowcount(@rows) | |
if @rowCount > 0 then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='%%=MicrositeURL(888888,"subscriberMID", "12345678")=%%'>Update Profile</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @subscriberMID | |
set @subscriberMID = iif(empty(RequestParameter("subscriberMID")),memberid, RequestParameter("subscriberMID")) | |
]%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" runat="server"> | |
Platform.Load("core", "1.1.1"); | |
</script>%%[set @subscriberMID = RequestParameter("subscriberMID")]%%<script type="text/javascript" runat="server"> | |
if (Variable.GetValue("@subscriberMID") != "") { | |
memberid = Variable.GetValue("@subscriberMID"); | |
} else { | |
memberid = Attribute.GetValue("memberid"); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @s, @o, @p, @m | |
output(concat("<br>Strip leading zeroes from a string")) | |
set @s = "0000012345" | |
set @p = "^0*(\d+)$" | |
set @o = RegExMatch(@s, @p, 1) | |
output(concat("<br>input: ", @s)) | |
output(concat('<br>pattern: "', @p, '"')) | |
output(concat("<br>output: ", @o)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
set @products = LookupOrderedRows("ProductDE",6, "AvgCustomerRating desc" ,"ApprovedForEmail","true") | |
set @productCount = rowcount(@products) | |
set @productXML = "<products>" | |
for @i = 1 to @productCount do | |
set @product = Row(@products, @i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ set @productPos = 1 ]%% | |
%%=TreatAsContent(ContentAreaByName("My Contents\ProductDisplay"))=%% | |
%%[ set @productPos = 2 ]%% | |
%%=TreatAsContent(ContentAreaByName("My Contents\ProductDisplay"))=%% | |
%%[ set @productPos = 3 ]%% | |
%%=TreatAsContent(ContentAreaByName("My Contents\ProductDisplay"))=%% | |
<a href="%%profile_center_url%%">Profile/Preference Center</a> |