[TYPO3-4-3] [TYPO3-core] RFC #13074: Feature: stdWrap for inclusion of CSS and JS files via pageRenderer

JoH asenau info at cybercraft.de
Tue Feb 9 17:38:57 CET 2010


>>> On the other hand it would be fine for me to make it consistent by
>>> using stdWrap as "the one and only" default parameter for all
>>> objects (making the
>>> direct "wrap" and "if" deprecated but offering them together with
>>> all stdWrap functions), while leaving the specialties to the first
>>> level of parameters.
>>>
>>> # deprecated will be removed in 4.6
>>> 10 = OBJECTNAME
>>> 10.wrap = <blah>|</blah>
>>>
>>> # new default for all cObjects including those
>>> # who still haven't got stdWrap functions
>>> 10 = OBJECTNAME
>>> 10.stdWrap.wrap = <blah>|</blah>
>>>
>>> For me consistency is a must to tackle the famous "last 20%" :-)
>
> I'm for this way to. It's easiest to understand for me (so you don't
> get confused which params are special object params and which are
> stdWrap) and it's in many parts already implemented. If we agree on
> this, I can try to come up with a patch for this.

Well - in the dev list Steffen Ritter came up with the following check:

count(array_intersect(array_keys($TS['mypart.']),array('wrap','if',.....)))>
0

The second array would contain all possible stdWrap function names to make
sure stdWrap will only be triggered when needed.
This way we can still use special parameters AND move all default stdWrap
functions to the top level of each object.

The interesting thing about this approach is: It would be fully backwards
compatible, because all the existing if, wrap & co. would still be working
as well as the existing "stdWrap.blah", since stdWrap got a recursive
function.

There might be issues with menuitems, since they use stdWrap in a completely
different way, but for the rest of the objects that I can remember, it
should be no big deal.

Any pitfalls I have forgotten? ;-)

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com




More information about the TYPO3-project-4-3 mailing list