[TASK] Imrove mail content template parsing capabilities
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<f:then>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{row.type} == 'headline' || {row.type} == 'text'">
|
||||
<f:if condition="{v:condition.string.contains(haystack: '{row.type}', needle: 'headline', then: '1')} || {row.type} == 'text'">
|
||||
<!--[if mso | IE]>
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:640px;" width="640" >
|
||||
<tr>
|
||||
@@ -13,7 +13,7 @@
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="direction:ltr;font-size:0px;padding:20px;text-align:center;">
|
||||
<td style="direction:ltr;font-size:0px;padding:0 20px;text-align:center;">
|
||||
<!--[if mso | IE]>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
@@ -27,15 +27,21 @@
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style width="100%">
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0;word-break:break-word;">
|
||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1;text-align:left;color:#000000;">
|
||||
<f:if condition="{row.type} == 'headline'">
|
||||
<f:then>
|
||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:left;color:#000000;">
|
||||
<f:switch expression="{row.type}">
|
||||
<f:case value="headline">
|
||||
<h1>{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
||||
</f:case>
|
||||
<f:case value="headline2">
|
||||
<h2>{row.data -> f:format.nl2br() -> f:format.raw()}</h2>
|
||||
</f:then>
|
||||
<f:else>
|
||||
</f:case>
|
||||
<f:case value="headline3">
|
||||
<h3>{row.data -> f:format.nl2br() -> f:format.raw()}</h3>
|
||||
</f:case>
|
||||
<f:defaultCase>
|
||||
<p>{row.data -> f:format.nl2br() -> f:format.raw()}</p>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:defaultCase>
|
||||
</f:switch>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
><v:format.trim>
|
||||
<v:condition.type.isArray value="{row.data}">
|
||||
<f:then>{row.data.0}: {row.data.1}</f:then>
|
||||
<f:else><f:if condition="{row.type} == 'headline' || {row.type} == 'text'"><f:if condition="{row.type} == 'headline'">
|
||||
<f:then>= {row.data} =</f:then>
|
||||
<f:else>{row.data}</f:else>
|
||||
</f:if></f:if></f:else>
|
||||
<f:else><f:if condition="{v:condition.string.contains(haystack: '{row.type}', needle: 'headline', then: '1')} || {row.type} == 'text'"><f:switch expression="{row.type}">
|
||||
<f:case value="headline">= {row.data} =</f:case>
|
||||
<f:case value="headline2">== {row.data} ==</f:case>
|
||||
<f:case value="headline3">=== {row.data} ===</f:case>
|
||||
<f:defaultCase>{row.data}</f:defaultCase>
|
||||
</f:switch></f:if></f:else>
|
||||
</v:condition.type.isArray>
|
||||
</v:format.trim><f:if condition="{content.{rowI.cycle}.data}">{br}<f:if condition="{v:condition.type.isArray(value='{content.{rowI.index}.data}', then: '1')} && {v:condition.type.isArray(value='{content.{rowI.cycle}.data}', then: '1')}"><f:else>{br}</f:else></f:if></f:if><f:if condition="{row.type} == 'buttons'">
|
||||
<f:then>{br}{br}{row.targets.0.1}:{br}{row.targets.0.0}{br}{br}{row.targets.1.1}:{br}{row.targets.1.0}</f:then>
|
||||
|
||||
Reference in New Issue
Block a user