1

我不知道如何将图像渲染到我的 renderObj COA 中。这是我的代码:

    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
          }

如您所见,我只输入了三个问号作为占位符。请帮我 :(

4

1 回答 1

2

根据您从哪里获取图像,这里有一些示例。

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
    }

}

无需将 lib.parseFunc_RTE 分配给图像,因为这仅对 RTE 内容有效。

有关 IMAGE 和 imgResource 的更多详细信息,请参阅官方文档 TSref。

图片: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

于 2011-08-07T15:31:47.187 回答