时间:2021-07-21人气:-
打开include/taglib/productimagelist.lib.php文件,找到:$ctp->LoadSource($innerText);在其后面另起一行加入$GLOBALS['autoindex'] = 0;找到:$revalue .= $ctp->GetResult();在其后面另起一行加入$GLOBALS['autoindex']++;这里的改动就算完了,接下来是内容页里调用:[field:global name=autoindex/]例子:代码如下:{dede:productimagelist}< span id="[field:global name=autoindex/]"><img src="[field:imgsrc/]" width="805" height="523" /></span>{/dede:productimagelist}假如有3个图片,则结果为:代码如下:< span id="0"><img src="1.jpg" width="805" height="523" /></span>< span id="1"><img src="2.jpg" width="805" height="523" /></span>< span id="2"><img src="3.jpg" width="805" height="523" /></span>你学会了么?