我尝试向tt_news img list source添加其他参数:data-src="path-to-img"
。可能吗?我尝试使用通用标记但没有任何成功:
plugin.tt_news.genericmarkers {
data = imgsource
imgsource = TEXT
imgsource {
field = image
wrap = <img src="uploads/pics/|" data-src="uploads/pics/|" />
file.maxW = 112
file.maxH = 124
}
}
但是在输出中我只在源代码中有这个:<img src="uploads/pics/img.jpg" data-src="uploads/pics/
没有第二个img源代码,img大小和关闭标记。
有什么建议吗?
答案 0 :(得分:0)
在我向您展示一个例子之前的一些评论:
你想要的是一个IMAGE对象,它允许操作图像
plugin.tt_news.genericmarkers {
imgsource = IMAGE
imgsource {
file.import = uploads/pics/
file.import.field = image
file.import.listNum = 0
file.width = 250
# if you just want to link the original image
params.field = image
params.wrap = data-src="/uploads/pics/|"
/*
# if you want want to manipulate the image as well, then use this code instead
# IMG_RESOURCE is almost the same as IMAGE, but returns only the path to the resulting image, not the »<img src="">«-Markup
params.cObject = IMG_RESOURCE
params.cObject {
file.import = uploads/pics/
file.import.field = image
file.import.listNum = 0
file.width = 500
stdWrap.wrap = data-src="|"
}
*/
}
}