pbootcms建站系统长度截取使用 len=* 或 lencn=* ,使用第二个将避免中英文长度不统一问题,一个英文字符算半个字。 如:内容列表标题截取 [list:title len=20]、内容详情页时间格式化 {content:title len=20} substr=x,y 截取一段 substr截取字符串长度,传递两个数字,第一个为起始位置,第二个为截取长度,如只有一个数字则截取此数字起后面全部 pbootcms模板列表调用演示代码:{pboot:list scode=[nav:scode] num=5 order=sorting start=2} <a href=”[list:link]” title=”[list:title]”> <strong>[list:date style=d]</strong>[list:date style=Y-m]</div> <h4>[list:title lencn=20]</h4> <p> [list:description lencn=60] </p> </a> {/pboot:list} |