phpcms从n开始调用文章

在栏目数据调用中从指定行数开始,比如从第2条或第N条开始调用。这种方法适合的场景:栏目第一条调用缩略图、文章简介,从第二条开始才是标题列表。

{pc:content action="lists" catid="70" order="listorder DESC" num="8" start="1" } {loop $data $r}
  • {$r[title]}
  • {/loop} {/pc}
    1
    2
    3
    4
    5
    { pc : content action = "lists" catid = "70"    order = "listorder DESC" num = "8"    start = "1" }
    { loop $ data $ r }
    < li > < a href = "{$r[url]}" title = "{$r[title]}"    target = "_blank" > { $ r [ title ] } < / a > < / li >
    { / loop }
    { / pc }

    你可能感兴趣的:(PHP)