Conditional Page Breaking

Quick tidbit today from Hok Min, the new RTF uber meister. It came out of a question with someone trying to use the 'split-by-page-break' command in a bit of a funky way. They had the following code:
<?if:CF_LPN_FLAG='Y'?>
 <?split-by-page-break: ?>
<?end if?>

Its a nice enhancement candidate but its not going to work. We are expecting the split-by-page-break command inside a loop not as part of a condition. Say, you're looping over departments (DEPT) and want a page break when the department changes. You'd have something like


<?for-each:DEPT?>
...
...
...
<?split-by-page-break:?>
<?end for-each?>

This would get out engine to insert a page break into the document before the occurrence of a new department. To get the original code above to work you physically need to insert a page break into your template. Kinda screws the WYSIWYG layout a bit but you get the desired functionality i.e. a conditional page break. For a sample RTF and XML click here
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值