POST TIME:2017-10-25 10:27
1.獲取dedecms織夢的循環(huán)次數(shù),關(guān)鍵是[field:global.autoindex/]這個(gè)標(biāo)簽
{dede:arclist typeid='3' row='8'}
[field:global.autoindex/]
{/dede:arclist}
2.在循環(huán)時(shí)做條件判斷。例:當(dāng)循環(huán)到第2條時(shí)增加一個(gè)
{dede:arclist typeid='3' row='8'}
<</code>li class="m[field:global.autoindex/]">
<</code>a href="[field:arcurl/]"><</code>img src="[field:litpic/]" /></</code>a>
</</code>li>
[field:global name=autoindex runphp='yes']
(@me!=4)? @me="":@me="<</code>li class='on'></</code>li>";
[/field:global]
{/dede:arclist}