{loop $array_images $k $r}
<dt><a target="_blank" href="{$array_images[$k][filepath]}"><img src="{thumb($r[filepath], 220, 160)}" alt="{if $array_images[$k][description]}{$array_images[$k][description]}{/if}" width="220" height="160" /></a></dt>
{/loop}
在文章模型里新建了一个 多图片 的字段.要在内容页调用出来.
使用V9的GET方式直接跟SQL语句,因为上传组图图片信息保存在v9_attachment中,而ID住处则要通过v9_attachment_index表来获取
其中还带有标题提示信息,
下面就有一个表之间的子查录过程:
{pc:get sql="select * from v9_attachment where aid in (select aid from v9_attachment_index where keyid='c-8-1')"return="data"}
{loop $data $r}
<img src="{APP_PATH}uploadfile/{$r[filepath]}" title="{substr($r[filename],0,-4)}"/><br />{substr($r[filename],0,-4)}
{/loop}
{/pc}