[Typo3-dev] [TYPO3] Do you think too many wrap in typoscripttemplate?

JoH info at cybercraft.de
Thu Dec 22 11:49:26 CET 2005


> There are too many differenet warp in TS.
> look at stdWrap.
>  innerWrap, innerWrap2, wrap, wrap2, wrap3, noTrimWrap, dataWrap,
> outerWrap and
>  append, postCObject, prepend, preCObject
>
> and TMENUITEM
>  before, after, stdWrap2, linkWrap, allStdWrap
>
> and half of them are not doucmented well.
> I mean, it should be more simple and tidy.
>
> What different between (TMENU).before and (TMENU).stdWrap.prepend?
> Why given a beforeImg? how about an append=IMAGE, is it same and
> standard.

Well - it's up to you how simple and tidy it is.
If you don't like (want/need) any of these wraps, functions and elements -
dont use them!
If youd don't understand what they are for due to a lack of documentation -
don't use them or write some documentation!
If it's enough for you to use wrap, append and prepend - fine, but not for
me and maybe many others as well.

noTrimWrap is the only way to use wrap without trimming whitespace before
wrapping.
dataWrap can insert many different getText values at once.
outerWrap sometimes is the only way of having an additional wrap around
existing items, because they are already using things like wrap or innerWrap
internally.
beforeImg can be linked separately from the linktext without any hassle just
by setting beforeImgLink = 1 (try to do that with prepend = IMAGE ...)
and so on ...
You see, there might be some good reasons for these "too many different
wraps" ...

You are right with append and prepend though - they do exactly the same
things as postCObject and preCObject.
But this doesn't necessarily mean that they should be removed.
There might be people outthere using them and this is why they must still be
available, even though it could make sense to mark them as "obsolete" in the
TSref.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau






More information about the TYPO3-dev mailing list