Menu sale orange
Mon Aug 01 2022 10:41:19 GMT+0000 (Coordinated Universal Time)
Saved by @CK_Michael
%%[
/* Retrieve header type */
SET @HeaderTranslation_DE = 'Template_Header Data V3'
SET @headerContentRows = LookupRows(@contentDEName,'CommunicationCulture',@comCulture,'blockName','header')
IF ROWCOUNT(@headerContentRows) == 0 THEN
raiseError("The header is not specified in this language", true)
ELSE
SET @headerContentRow = Row(@headerContentRows,1)
SET @headerType = Field(@headerContentRow, "Value")
ENDIF
SET @contentRows = LookupRows(@HeaderTranslation_DE ,'CommunicationCulture',@comCulture, 'Type',@headerType)
IF ROWCOUNT(@contentRows) == 0 THEN
raiseError("No translation available for this header",true)
ELSE
SET @contentRow = Row(@contentRows,1)
SET @PREHEADER_COPY = TreatAsContent(Field(@contentRow, "PREHEADER_COPY"))
ENDIF
]%%
<!-- Hidden preheader and online version -->
<div style="display:none;font-size:1px;color:#000001;line-height:1px;font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;"> %%=v(@PREHEADER_COPY)=%%</div>
<table role="presentation" width="640" border="0" cellspacing="0" cellpadding="0" class="content-wrapper" align="center" style="width:640px; margin:0 auto;" bgcolor="#f3f2f1">
<tr>
<td valign="middle" class="black" align="center" style="font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; color: #000001; font-size: 9px; line-height: 11px; padding: 8px 0 20px 0; vertical-align: middle;">%%=v(@PREHEADER_COPY)=%%</td>
</tr>
</table>
<!-- /Hidden preheader and online version -->%%[
/*************************************************************************************/
/************************** TRANSLATION REPLACEMENT *****************************/
/* Replace the text below with a unique name for the content block within the email */
/* e.g. SET @blockName = "Optional_Bar" */
/**/
SET @blockName = 'Optional_Bar'
/**/
/*************************************************************************************/
SET @blockName = Iif(Empty(@OptionalBarName), @blockName, @OptionalBarName)
SET @contentRows = LookupRows('Template_Optional_Banner','CommunicationCulture',@comCulture,'blockName',@blockName)
IF ROWCOUNT(@contentRows) == 0 THEN
/*raiseError("No translation available for Optional_Bar",true)*/
ELSE
SET @contentRow = Row(@contentRows,1)
SET @COPY1_TEXT = Field(@contentRow, "COPY1_TEXT")
ENDIF
]%%
%%[IF Not Empty(@COPY1_TEXT) THEN]%%
<!-- Optional Bar -->
<table role="presentation" class="content-wrapper" style="width:640px; margin:0 auto;" width="640" cellspacing="0" cellpadding="0" border="0" bgcolor="#000000" align="center">
<tr class="white">
<td class="font-13" style="font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; color: #fffffe; font-size: 14px; line-height: 15px; padding: 8px 30px 8px 30px; vertical-align: middle; text-transform: none; font-weight: 600;" align="center">%%=v(@COPY1_TEXT)=%%</td>
</tr>
</table>
%%[ENDIF]%%
<!-- /Optional Bar -->
%%[
/* Retrieve header type */
SET @HeaderTranslation_DE = 'Template_Header Data V3'
SET @headerContentRows = LookupRows(@contentDEName,'CommunicationCulture',@comCulture,'blockName','header')
IF ROWCOUNT(@headerContentRows) == 0 THEN
raiseError("The header is not specified in this language", true)
ELSE
SET @headerContentRow = Row(@headerContentRows,1)
SET @headerType = Field(@headerContentRow, "Value")
ENDIF
/* Check if there is a sale */
SET @showSale = 0
SET @saleRows = LookupRows('SDB_Config', 'BannerType', 'Sale', 'CommunicationCulture', @comCulture)
IF RowCount(@saleRows) > 0 THEN
SET @startingDate = Field(Row(@saleRows, 1), 'StartingDate')
SET @endingDate = Field(Row(@saleRows, 1), 'EndingDate')
SET @currentDate = Now()
SET @currentDateString = FormatDate(@currentDate, 'YYYY/MM/DD','')
SET @currentDate = DateParse(@currentDateString)
IF NOT Empty(@startingDate) AND NOT Empty(@endingDate) AND @startingDate <= @endingDate AND @startingDate <= @currentDate AND @endingDate >= @currentDate THEN
SET @showSale = 1
ENDIF
ENDIF
SET @contentRows = LookupRows(@HeaderTranslation_DE ,'CommunicationCulture',@comCulture, 'Type',@headerType)
IF ROWCOUNT(@contentRows) == 0 THEN
raiseError("No translation available for this header",true)
ELSE
SET @contentRow = Row(@contentRows,1)
SET @LOGO_LINK = Field(@contentRow, "LOGO_LINK")
SET @PREHEADER_COPY = TreatAsContent(Field(@contentRow, "PREHEADER_COPY"))
SET @MENU1_COPY = Field(@contentRow, "MENU1_COPY")
SET @MENU1_LINK = Field(@contentRow, "MENU1_LINK")
SET @MENU2_COPY = Field(@contentRow, "MENU2_COPY")
SET @MENU2_LINK = Field(@contentRow, "MENU2_LINK")
SET @MENU3_COPY = Field(@contentRow, "MENU3_COPY")
SET @MENU3_LINK = Field(@contentRow, "MENU3_LINK")
SET @MENU4_COPY = Field(@contentRow, "MENU4_COPY")
SET @MENU4_LINK = Field(@contentRow, "MENU4_LINK")
ENDIF
/*** Start MetaData tagging ***/
SET @Link_Value = @LOGO_LINK
SET @Link_FieldName = "LOGO_LINK"
ContentBlockByID('66456') /* CA Utilities\MetaData_Link_Tagging */
SET @LOGO_LINK = @Link_Value
SET @Link_Value = @MENU1_LINK
SET @Link_FieldName = "MENU1_LINK"
ContentBlockByID('66456') /* CA Utilities\MetaData_Link_Tagging */
SET @MENU1_LINK = @Link_Value
SET @Link_Value = @MENU2_LINK
SET @Link_FieldName = "MENU2_LINK"
ContentBlockByID('66456') /* CA Utilities\MetaData_Link_Tagging */
SET @MENU2_LINK = @Link_Value
SET @Link_Value = @MENU3_LINK
SET @Link_FieldName = "MENU3_LINK"
ContentBlockByID('66456') /* CA Utilities\MetaData_Link_Tagging */
SET @MENU3_LINK = @Link_Value
SET @Link_Value = @MENU4_LINK
SET @Link_FieldName = "MENU4_LINK"
ContentBlockByID('66456') /* CA Utilities\MetaData_Link_Tagging */
SET @MENU4_LINK = @Link_Value
/*** End MetaData tagging ***/
/* Retrieve footer type without version */
SET @headerType = SUBSTRING(@headerType,8,SUBTRACT(LENGTH(@headerType),7))
SET @indexHeader = INDEXOF(@headerType,"_")
IF (@indexHeader != 0) THEN
SET @headerType = SUBSTRING(@headerType,1,SUBTRACT(INDEXOF(@headerType,"_"),1))
ENDIF
SET @menu4color = "#000000"
IF (@headerType=="header_sale") THEN
SET @menu4color = "#ff0000"
ENDIF
SET @menu3class = "nomobile"
IF (@headerType=="header_std_v1") THEN
SET @menu3class = "font12"
ENDIF
]%%
<!-- Logo and 4 menu-items - choose mobile menu 4 items too at the bottom -->
<table class="content-wrapper" style="width:640px; margin:0 auto;" width="640" cellspacing="0" cellpadding="0" border="0" bgcolor="#FF6312" align="center">
<tr>
<td style="font-size:1px; line-height:1px; height: 30px;" height="30"> </td>
</tr>
<tr>
<td class="mobile-hide" style="font-size:1px; line-height:1px; height: 10px;" height="10"> </td>
</tr>
</table>
<table role="presentation" class="content-wrapper" style="width:640px; margin:0 auto;" width="640" cellspacing="0" cellpadding="0" border="0" bgcolor="#FF6312" align="center">
<tr>
<td class="center" style="padding-left: 30px; padding-right: 30px;"><a href="%%=RedirectTo(@LOGO_LINK)=%%" target="_blank" alias="LOGO_LINK"><img src="https://image.mailing.calvinklein.com/lib/fe9012747563017574/m/10/2a36c6c1-9801-43b6-a8b6-f62a422271aa.png" title="Calvin Klein" alt="Calvin Klein" style="display: block; font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; font-size: 14px;" height="30" border="0"></a></td>
<td class="mobile-hide" style="padding-right: 30px; vertical-align: bottom" valign="bottom" align="right"><table cellspacing="0" cellpadding="0" border="0">
<tr class="black">
<td style="font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; color: #ffffff; font-size: 14px; line-height: 15px; vertical-align: middle; text-transform: none; font-weight: 600; padding-right: 30px; vertical-align: bottom;" valign="bottom" align="left"><a href="%%=RedirectTo(@MENU1_LINK)=%%" target="_blank" style="color: #ffffff; text-decoration: none;" alias="MENU1_LINK">%%=v(@MENU1_COPY)=%%</a></td>
<td style="font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; color: #ffffff; font-size: 14px; line-height: 15px; vertical-align: middle; text-transform: none; font-weight: 600; padding-right: 30px; vertical-align: bottom;" valign="bottom" align="left"><a href="%%=RedirectTo(@MENU2_LINK)=%%" target="_blank" style="color: #ffffff; text-decoration: none;" alias="MENU2_LINK">%%=v(@MENU2_COPY)=%%</a></td>
<td style="font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; color: #ffffff; font-size: 14px; line-height: 15px; vertical-align: middle; text-transform: none; font-weight: 600; padding-right: 30px; vertical-align: bottom;" valign="bottom" align="left"><a href="%%=RedirectTo(@MENU3_LINK)=%%" target="_blank" style="color: #ffffff; text-decoration: none;" alias="MENU3_LINK">%%=v(@MENU3_COPY)=%%</a></td>
%%[IF @showSale THEN]%%
<td style="font-family: 'KleinRegular', Futura, Helvetica, Arial, sans-serif; color: #ffffff; font-size: 14px; line-height: 15px; vertical-align: middle; text-transform: none; font-weight: 600; vertical-align: bottom;" valign="bottom" align="left"><a href="%%=RedirectTo(@MENU4_LINK)=%%" target="_blank" style="color: #ffffff; text-decoration: none;" alias="MENU4_LINK">%%=v(@MENU4_COPY)=%%</a></td>
%%[ENDIF]%%
</tr>
</table></td>
</tr>
</table>
<table class="content-wrapper" style="width:640px; margin:0 auto;" width="640" cellspacing="0" cellpadding="0" border="0" bgcolor="#FF6312" align="center">
<tr>
<td style="font-size:1px; height: 30px; border-bottom: 2px;" height="30"> </td>
</tr>
</table>
<!-- /Logo and 4 menu-items - choose mobile menu 4 items too at the bottom -->



Comments