[TYPO3-core] RFC: Feature Request #6473: Extend render userFuncs by TS field property

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Oct 25 11:23:50 CEST 2007


Hi Ingmar,

Ingmar Schlecht wrote: on 25.10.2007 10:20:

> 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.

I think Typoscript doesn't necessarily means "very complicated", but
most of all "very flexibel" rendering. This is what most people that
needs changes in rendering want to have. Either the admin likes
css_styled_content output, so he leaves PHP (and TypoScript) alone, or
he wants to adapt it to their own needs, which is much easier if it is
TypoScript based. And there is the third group of people, which want to
re-use the rendering provided by TYPO3 in their own extensions or
configurations. Calling "BULLETS" cObj in TypoScript is much more
error-prone than calling "USER" with some userFunc from css_styled_content.

The complicated TypoScript from content(default) only comes from the
fact that it had to mix semantic output with styling parameters
(fontColor etc), which is not needed anymore. TypoScript should only be
used to output semantic information (styling goes in .css) and this
makes it very easy to understand (for easy task like generating a bullet
list).

I don't find css_styled_content "refreshing" if it has to use userFunc
for such an easy task. The userFunc isn't easily documented. We could
have that documented in TSref if it had its own cObj.


Cheers,
Ernesto


More information about the TYPO3-team-core mailing list