[TYPO3-dev] [Typo3-dev] [TYPO3] Do you think too many wrap intyposcript template?

JoH info at cybercraft.de
Fri Dec 23 10:05:06 CET 2005


>> 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.
>
> About the dataWrap, wrap, noTrimWrap
> There should be an better way to do.
>
> e.g.
> (stdWrap).wrap=xxx|xxx
> (stdWrap).wrap.insertData=1
> (stdWrap).wrap.noTrim=1
> (stdWrap).wrap.escapeHTML=1
>
> You don't use wrap and noTrimWrap and dataWrap at same time? didn't
> it?
> We are not looking for many different wrap.
> You want a single wrap, but with different behavior.
>
> At least, please somebody update the doc_core_tsref on typo3.org.
> Let newbie know that they are unused.

As I already told you, they are not unused.
The fact that you don't use them doesn't mean they are useless for others.

And I don't really get the point.
You are complaining about too many wraps and that they are confusing or
misleading.
At the same time you are asking to not just remove these wraps but insert
_additional_ parameters to get the same behaviour as before.
Sorry - but this is even more confusing and it will take more code to
acchieve the same goal.

Why should I want to use things like

wrap = whatever|whatever
wrap.insertData = 1

when I could use

dataWrap = {whatever}|{whatever}

instead. And yes I might use dataWrap _and_ other wraps at the same time.

Example:
innerWrap and outerWrap have stdWrap properties themselves and thus can be
filled based on a cObject.
You can do something like

dataWrap = {whatever}|{whatever}
innerWrap.cObject = CASE
innerWrap.cObject {
    key.field = somefield
    ...
    a lot of different wraps here
    ...
}
outerWrap.cObject = CASE
outerWrap.cObject {
    key.data = GPvar:something
    ...
    a lot of different wraps here
    ...
}

This way you can have three different conditional wraps that get their
behaviour from DB fields and/or GPvars.
Maybe you didn't do something like this before, but it is working perfectly
fine and is only possible with different wrap-types.
If you want to see a working example have a look at the implementation of
the user selectable frames, borders and indentations in CSS-styled-content.

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