if($ctag->GetName()==”img”)
{
$row = array();
$row[‘imgsrc’] = trim($ctag->GetInnerText());
$row[‘text’] = $ctag->GetAtt(‘text’);
$images[] = $row;
}
只需在里面插入$row[‘litpic’] =$ctag->GetAtt(‘ddimg’); 即可解决
这样在{productimagelist}中使用[field:litpic/]获取到图片的缩略图,达到优化页面加载速度!if($ctag->GetName()==”img”)
{
$row = array();
$row[‘imgsrc’] = trim($ctag->GetInnerText());
$row[‘text’] = $ctag->GetAtt(‘text’);
$row[‘litpic’] =$ctag->GetAtt(‘ddimg’); //得到缩略图
$images[] = $row;
}