- {pc:content action="lists" catid="$catid" num="10" order="listorder DESC" moreinfo="1" page="$page"}
- <div class="">
- {loop $data $n $r}
- <ul class="content dh-02" style="border-bottom:0;">
- <li><a href="{$r[url]}">{$r[title]}</a></li>
- </ul>
- <div class="col-auto">
- {loop string2array($r['pictureurls']) $pic_k $v}
- {if $pic_k>3}
- {php break}
- {/if}
- <a href="{$r[url]}"><img src="{thumb($v[url],175,120)}" width="175" height="120" alt="{$v[alt]}"/></a>
- {/loop}
- </div>
- {/loop}
- </div>
- {/pc}
上面代码中的这段代码的作用是只输出组图的前4个图片. 需要更多的自己改. 不做限制的请把这段代码删掉.
- {if $pic_k>3}
- {php break}
- {/if}
方法二:
已下标签是调用全部组图
- {pc:content action="lists" catid="$catid" num="1" moreinfo="1" order="id DESC" " page="$page"}
- {loop $data $v}
- {$v[title]}
- <?php
- $arr = $v[pictureurls];
- $arr ="\$arr =$arr ;";
- eval($arr );
- ?>
- {loop $arr $r}
- <img src="{thumb($r[url], 100, 137, 0)}" alt="{$r[alt]}" rel="{$r[url]}"/>
- {/loop}
- {/loop}
- {/pc}