默认的多行多列图集列表{dede:productimagelist}使用只能使用[field:text/]和[field:imgsrc/],而没有缩略图的标签,同过一行代码教你如何调用缩略图,优化你的页面载入速度,我们打开include/taglib/productimagelist.lib.php?文件找到如下代码
? if($ctag->GetName()=="img")
??????????? {
??????????????? $row = array();
??????????????? $row['imgsrc'] = trim($ctag->GetInnerText());
??????????????? $row['text'] = $ctag->GetAtt('text');
??????????????? $images[] = $row;
??????????? }
?
我们只需在里面插入$row['litpic'] =$ctag->GetAtt('ddimg');?即可解决
?
?if($ctag->GetName()=="img")
??????????? {
??????????????? $row = array();
??????????????? $row['imgsrc'] = trim($ctag->GetInnerText());
??????????????? $row['text'] = $ctag->GetAtt('text');?????????? ???
??????????????? $row['litpic'] =$ctag->GetAtt('ddimg'); //得到缩略图
??????????????? $images[] = $row;
??????????? }
?
这样我们在{productimagelist}中使用[field:litpic/]获取到图片的缩略图,达到优化页面加载速度!