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/]獲取到圖片的縮略圖,達到優(yōu)化頁面加載速度!
新聞熱點
疑難解答