NetSuite:FreeMarker 列表被下推
NetSuite: FreeMarker List Getting Pushed Down
我不明白为什么这个列表被下调了?列表项从第 4 行开始。我希望 <#compress> 指令会截断任何白色 space 但对输出没有影响。
空白 line/white space
空白 line/white space
空白 line/white space
空白 line/white space
冰淇淋 $50.00
香草
--下一页--
冰淇淋 $50.00
巧克力
<hr
style="width: 100%; color: #d3d3d3; background-color: #d3d3d3; height: 1px;" />
<!-- start items -->
<#list record.item as item>
<table style="margin-top: 10px; width: 100%;">
<#if item.custcol_comments?contains("cream")>
<#compress>
<tr>
<td colspan="12" style="text-align: center;"><span
style="font-weight: bold; line-height: 10%; color: #333333;">${item.item}</span><br />${item.description}</td>
<td colspan="4" style="text-align: center;"> </td>
<td colspan="4" style="text-align: center;">${item.amount}</td>
</tr>
</#compress>
</#if>
</table>
</#list>
<!-- end items -->
<hr
您需要调换 table
和 <#list>
标签的顺序。您现在正在做的是为每个订单项创建一个单独的 table,无论它是否符合条件。
<table style="margin-top: 10px; width: 100%;">
<#list record.item as item>
<#if item.custcol_comments?contains("cream")>
<tr>
<td colspan="12" style="text-align: center;"><span style="font-weight: bold; line-height: 10%; color: #333333;">${item.item}</span><br />${item.description}</td>
<td colspan="4" style="text-align: center;"> </td>
<td colspan="4" style="text-align: center;">${item.amount}</td>
</tr>
</#if>
</table>
</#list>
<#compress>
将删除空格但不会删除空的 table,但在任何情况下,BFO 渲染器都会自动删除额外的空格,因此 NetSuite 模板通常不需要它。
我不明白为什么这个列表被下调了?列表项从第 4 行开始。我希望 <#compress> 指令会截断任何白色 space 但对输出没有影响。
空白 line/white space
空白 line/white space
空白 line/white space
空白 line/white space
冰淇淋 $50.00
香草
--下一页--
冰淇淋 $50.00
巧克力
<hr
style="width: 100%; color: #d3d3d3; background-color: #d3d3d3; height: 1px;" />
<!-- start items -->
<#list record.item as item>
<table style="margin-top: 10px; width: 100%;">
<#if item.custcol_comments?contains("cream")>
<#compress>
<tr>
<td colspan="12" style="text-align: center;"><span
style="font-weight: bold; line-height: 10%; color: #333333;">${item.item}</span><br />${item.description}</td>
<td colspan="4" style="text-align: center;"> </td>
<td colspan="4" style="text-align: center;">${item.amount}</td>
</tr>
</#compress>
</#if>
</table>
</#list>
<!-- end items -->
<hr
您需要调换 table
和 <#list>
标签的顺序。您现在正在做的是为每个订单项创建一个单独的 table,无论它是否符合条件。
<table style="margin-top: 10px; width: 100%;">
<#list record.item as item>
<#if item.custcol_comments?contains("cream")>
<tr>
<td colspan="12" style="text-align: center;"><span style="font-weight: bold; line-height: 10%; color: #333333;">${item.item}</span><br />${item.description}</td>
<td colspan="4" style="text-align: center;"> </td>
<td colspan="4" style="text-align: center;">${item.amount}</td>
</tr>
</#if>
</table>
</#list>
<#compress>
将删除空格但不会删除空的 table,但在任何情况下,BFO 渲染器都会自动删除额外的空格,因此 NetSuite 模板通常不需要它。