![](/img/trans.png)
[英]TYPO3 tt_news genericmarkers url for every news item on list view
[英]TYPO3 modyfing img source on tt_news list item
我正在尝试将其他参数添加到tt_news img列表源: 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大小和关闭标签。
有什么建议么?
在向您展示示例之前,请注意以下几点:
您想要的是一个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="|" } */ } }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.