[TYPO3-content-rendering] [Typo3-dev] Less features, more future

JoH info at cybercraft.de
Fri Oct 14 15:47:50 CEST 2005


>> temp.whatever = COA
>> temp.whatever {
>>     stdWrap.dynamicCSS_entry = 1
>>     stdWrap.dynamicCSS_entry {
>>         tag = <div>
>>         baseClass = imagecontainer
>>         params.cObject = COA
>>         params.cObject {
>>             text-align = TEXT
>>             text-align.field = fieldname
>>             width = TEXT
>>             width.data = whatever
>>             width.wrap = |px
>>         }
>>     }
>
> Hm, at first I wasn't very sure if that's the right approach, because
> a cObject is expected just to return some output and here you are
> returning the content and also setting some CSS that TYPO3 has to
> include somewhere else.
>
> But then thinking more, that's exactly what we want TYPO3 to do for
> us,
> a feature which would replace all those fontWrap and formatting stuff
> that the "good-old" content (default) used to do with stdWrap. Being
> able to set this in TypoScript is nice, as we can make use of the
> CONSTANT EDITOR etc.
>
> What I don't like is the syntax of the "params", as you call it. A
> "COA" is misleading here, because you don't really expect it to
> contain an "array of content objects", you want just an array of
> "TEXT" objects. I would then rather prefer to provide a new cObject
> for that purpose, called "CSS". This is exactly what I suggested some
> days ago, refer to
> my email to typo3-dev list, from 12.10.2005, 15:11, in the thread
> "Less features, more future". Browse that email down a bit, to the
> "CSS" part.

Well  - the COA was just an example.
The only important thing (be it in a COA or a new CSS object) is to have the
same behaviour like in a COA and stdWrap properties for each and every
entry.
This way you can assign different things based on getText Informations like
GPvars, Header Informations, Useragents.
Even the "layout" field could be used here to modify parameters for
different situations.

params {
    text-align = CASE
    text-align {
        key.field = layout
        default = TEXT
        default.value = {$textAlignDefault}
        1 = TEXT
        1.value = {$textAlign1}
        2 = TEXT
        2.value = {$textAlign2}
        3 = TEXT
        3.value = {$textAlign3}
    }
    width = TEXT
    width.value = {$width}-{$padding}*2
    width.prioriCalc = 1
    }
 }

[browser = IE]
params.width.value = {$width}
[global]

Don't know if this would work exactly as shown above, but just as an
example.

> I think overall it's a nice overall idea and not really much is needed
> to have this already working in current TYPO3 in our extentions. I'll
> give it a try in cron_cssstyledimgtext as soon as I have some time,
> and let's see if we can convince more -core people to enter the
> discussion. :)

OK - let's see ...

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-project-content-rendering mailing list