As I started with TYPO3 and TypoScript it seemed to me like a big annoying patchwork. One of the first things I did not like while developing TYPO3 templates was the generated (X)HTML-Output, especially the frontend output of the rich text editor. If you try to read the bodytext field from the database table all links are lost. The following code snippet gives you a little help if you want to read data from TYPO3’s bodytext field adding individual wraps around the content and without losing links.
temp.test = CONTENT
temp.test {
table = tt_content
select {
# uid = 1 for example
where = uid=1
# CType is textPic for Example
andWhere = deleted=0 AND hidden=0 AND CType='textPic'
max = 1
}
renderObj = COA
renderObj {
# Wrap it as you want
stdWrap.wrap =
10.field = bodytext
10.parseFunc < lib.parseFunc_RTE 10.parseFunc.nonTypoTagStdWrap.encapsLines.addAttributes.P.class >
10.wrap =
}
0 comments:
Post a Comment