NetSuite:FreeMarker列表被向下推

NetSuite:FreeMarker列表被向下推,netsuite,freemarker,Netsuite,Freemarker,我不明白为什么这个名单会被推下去?列表项从第4行开始。我希望该指令会截断任何空白,但不会影响输出。 空行/空白 空行/空白 空行/空白 空行/空白 冰淇淋$50.00 香草的 --下一页-- 冰淇淋$50.00 巧克力 <hr style="width: 100%; color: #d3d3d3; background-color: #d3d3d3; height: 1px;" /> <!-- start items --> <#list reco

我不明白为什么这个名单会被推下去?列表项从第4行开始。我希望该指令会截断任何空白,但不会影响输出。




空行/空白
空行/空白
空行/空白
空行/空白


冰淇淋$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;">&nbsp;</td>
        <td colspan="4" style="text-align: center;">${item.amount}</td>
</tr>
 </#compress>
  </#if>
</table>
</#list>
<!-- end items -->
<hr

${item.item}
${item.description} ${item.amount}
您需要交换
标记的顺序。您现在要做的是为每个行项目创建一个单独的表,而不管它是否符合条件

<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;">&nbsp;</td>
        <td colspan="4" style="text-align: center;">${item.amount}</td>
      </tr>
    </#if>
  </table>
</#list>

${item.item}
${item.description} ${item.amount}

将删除空白,但不会删除空表,但在任何情况下,BFO渲染器都会自动删除额外的空白,因此NetSuite模板中通常不需要这些空白。

工作得非常好!非常感谢。我真的很感谢你的全面答复。