<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

多行多列图集在模板中读取缩略图

时间:2020-12-15

默认的多行多列图集列表{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/]获取到图片的缩略图,达到优化页面加载速度!
0
首页
案例
关于
联系