I'm trying to add additional parameter to tt_news img list source: data-src="path-to-img"
. Is it possible? I try with generic marker but without any success:
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
}
}
But on output I only have this in source: <img src="uploads/pics/img.jpg" data-src="uploads/pics/
without second img source, img size and close tag.
Any suggestions?
Some remarks before I show you an example:
what you want is an IMAGE object, which allows to manipulate images
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="|" } */ } }
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.