[TYPO3-core] RFC: Feature Request #6473: Extend render userFuncs by TS field property
Ingmar Schlecht
ingmar at typo3.org
Thu Oct 25 10:20:08 CEST 2007
Hi Ernesto,
Ernesto Baschny [cron IT] wrote:
> my ideas about that would be:
>
> * function render_bullets: I wonder why this wasn't done in pure
> TypoScript from start? There doesn't seem to be any "magic" involved.
> Just splitting a field by lines, wrapping something around each line
> (<li>|</li>) and then wrapping something around the whole result
> (<ul>|</ul>). Any problems in moving that stuff to Typoscript?
The reason at that time was to get rid of too complicated TS based
content rendering. Compare the old "content(default)" to
css_styled_content and you get the idea how refreshingly easy to
understand css_styled_content is.
Note that I'm not arguing against moving render_bullets() into TypoScript.
> * function render_table seems to be a good candidate for a content
> object "TABLE" (function TABLE() in class.tslib_content.php).
>
> * function render_upload can also be used as a cObject called "FILES"
...but always keep in mind not to get too complicated with TS.
cheers
Ingmar
> Oliver Hader wrote: on 17.10.2007 08:57:
>
>> Dmitry Dulepov [typo3] schrieb:
>>> Oliver Hader wrote:
>>>> Integrate the possibility to use the field property for bullets, tables
>>>> and uploads using TypoScript.
>>> I like the idea but may be it should be not just field but the whole
>>> stdWrap?
>> Hm, this has to be split up in several parts/actions for rendering, e.g.
>>
>> 1) Get the content (currently this is hardcoded to the bodytext field)
>> 2) Split the content and process each part/line and use 'innerStdWrap'
>> 3) Wrap the whole thing by using stdWrap
>>
>> So, what we need is a stdWrap for the content/data, e.g.
>>
>> tt_content.bullets {
>> 20 = USER
>> 20.userFunc = tx_cssstyledcontent_pi1->render_bullets
>>
>> # the raw data
>> 20.dataStdWrap {
>> field = bodytext
>> ifEmpty.cObject = COA
>> ifEmpty.cObject {
>> ...
>> }
>> }
>>
>> # the processing of each line/cell/whatever
>> 20.innerStdWrap.parseFunc = < lib.parseFunc
>>
>> # the wrap for the whole nearly finished thing
>> 20.stdWrap {
>> editIcons = tt_content: bodytext, [layout]
>> editIcons {
>> ...
>> }
>> prefixComment = 2 | Bullet list:
>> }
>> }
>>
>> What do you think?
>>
>>
>> olly
--
Ingmar Schlecht
TYPO3 Association Active Member
More information about the TYPO3-team-core
mailing list