迅睿框架 版主:迅睿框架研发组
评论调用与缩略图调用语法
类型:迅睿CMS 更新时间:2024-10-28 23:21:10 module=MOD_DIR

有缩略图10张和10条评论

如何随机调取3张缩略图和3条评论组成一个内容。

将下面的代码重组

<?php if ($thumb) { $key=0;foreach ($thumb as $c) { ?>

<img src="{dr_get_file($c.file)}" >

<?php $key++;} } ?>


{comment module=MOD_DIR order=rand() num=3}

<p>{$t.content}</p>

{/comment}