电话
13363039260
适用模型:图集,列表页判断是否有图集图片并判断图片数量适合做一些复杂的排版,适用图集模型或自定义多图,代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {eyou:arclist} <!-- 如果有相集则显示相集 --> {eyou:arcview id='field2' aid='$field.aid'} {eyou:empty name='$field2.image_list' /} < img src = "{$field2.litpic}" alt = "{$field.title}" class = "img-responsive" > {eyou:else /} {eyou:volist name="$field2.image_list" id='field3'} {eyou:assign name='pid' value='$__LIST__|count=###'/} {eyou:if condition="$pid >'3'"} < img src = "{$field3.image_url}" alt = "{$field.title}" class = "img-responsive" > {eyou:else /} < img src = "{$field3.image_url}" alt = "{$field.title}" class = "img-responsive" > {/eyou:if} {/eyou:volist} {/eyou:empty} {/eyou:arcview} <!-- 如果有相集则显示相集 end--> {/eyou:arclist} |
{eyou:assign name='pid' value='$__LIST__|count=###'/}指的是获取图集数量