typoscript renderObj image problem
i dont figure out how i can render an image into my renderObj COA. Here my code:
renderObj = COA
renderObj {
10 = TEXT
10.field = header
10.parseFunc < lib.parseFunc_RTE
10.wrap = <h2>|</h2>
20 = TEXT
开发者_开发问答 20.field = bodytext
20.parseFunc < lib.parseFunc_RTE
30 = IMAGE
???
30.parseFunc < lib.parseFunc_RTE
}
As you can see i typed only three questionmarks as placeholder. Please help me :(
Depending on where you get the image from, here are some examples.
renderObj = COA
renderObj {
# Static image
10 = IMAGE
10.file = fileadmin/user_upload/images/myPicture.jpg
# From a database field
20 = IMAGE
20.file.import = uploads/pics/
20.file.import {
field = image
listNum = 0
}
}
There is no need to assign lib.parseFunc_RTE to the image, since that's only valid for RTE content.
See the official documentation, TSref, for more details on IMAGE ande imgResource.
IMAGE: http://typo3.org/documentation/document-library/references/doc_core_tsref/4.4.0/view/1/7/#id2632631 imgResource: http://typo3.org/documentation/document-library/references/doc_core_tsref/4.4.0/view/1/5/#id2619917
精彩评论