[FEATURE] Add contentBlockHtml and diver to mail utility
This commit is contained in:
@@ -24,12 +24,16 @@
|
||||
<f:for each="{content}" as="row" key="rowKey" iteration="rowI" >
|
||||
<v:condition.type.isArray value="{row.data}">
|
||||
<f:else>
|
||||
<f:if condition="{row.type} == 'contentBlockHtml'">
|
||||
{row.data -> f:format.raw()}
|
||||
</f:if>
|
||||
<f:if condition="{v:condition.string.contains(haystack: '{row.type}', needle: 'headline', then: '1')}
|
||||
|| {row.type} == 'text'
|
||||
|| {row.type} == 'button'
|
||||
|| {row.type} == 'buttonleft'
|
||||
|| {row.type} == 'buttoncenter'
|
||||
|| {row.type} == 'buttonright'
|
||||
|| {row.type} == 'divider'
|
||||
">
|
||||
<!--[if mso | IE]>
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:{width}px;" width="{width}" >
|
||||
@@ -50,6 +54,14 @@
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<f:switch expression="{row.type}">
|
||||
<f:case value="divider">
|
||||
<f:variable name='paddingTd' value='20px 0' />
|
||||
</f:case>
|
||||
<f:defaultCase>
|
||||
<f:variable name='paddingTd' value='0' />
|
||||
</f:defaultCase>
|
||||
</f:switch>
|
||||
<td style="vertical-align:top;padding:0;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style width="100%">
|
||||
<tr>
|
||||
@@ -64,7 +76,7 @@
|
||||
<f:variable name='align' value='left' />
|
||||
</f:defaultCase>
|
||||
</f:switch>
|
||||
<td align="{align}" style="font-size:0px;padding:0;word-break:break-word;">
|
||||
<td align="{align}" style="font-size:0px;padding:{paddingTd};word-break:break-word;">
|
||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
||||
<f:switch expression="{row.type}">
|
||||
<f:case value="headline">
|
||||
@@ -101,6 +113,15 @@
|
||||
{row.data -> f:format.nl2br() -> f:format.raw()}
|
||||
</span>
|
||||
</f:case>
|
||||
<f:case value="divider">
|
||||
<p style="border-top:solid 2px #025093;font-size:1px;margin:0px auto;width:100%;">
|
||||
</p>
|
||||
<!--[if mso | IE]>
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 2px #025093;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px" >
|
||||
<tr><td style="height:0;line-height:0;"> </td></tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</f:case>
|
||||
<f:defaultCase>
|
||||
<p>{row.data -> f:format.nl2br() -> f:format.raw()}</p>
|
||||
</f:defaultCase>
|
||||
|
||||
Reference in New Issue
Block a user