[TYPO3-english] COA inside another COA - is it a wise thing?
JoH asenau
info at cybercraft.de
Tue May 11 09:45:33 CEST 2010
>> A little "odd" question about typoscript:
>>
>> Is it "wise" to have a COA inside another COA? I mean Something like:
>
> Several reasons against it:
> - it takes more memory to hold of these objects
> - it takes more stack
> - it takes longer to parse
> - it looks less structured
> - it is harder to understand
>
> I would avoid using COAs if I can.
I would not - althought you might be right with the first 3 points, the
latter 2 IMHO are just the contrary. Since it's not about COA_INT, which
usually will be rendered at each request but about COA, which is rendered
once after cache has been cleared, IMHO performance is not as important
here.
COA gives you a much better code structure and is easier to understand,
because it uses the same numbered structure as the PAGE object. It works
just like a div container or maybe even more like a fieldset in HTML.
I really can't see what would be "less structured" and "harder to
understand", when using a COA this way:
myElement = COA
myElement {
wrap = <div class="container">|</div>
10 = TEXT
10 {
value = blah
wrap = <h1>|</h1>
}
20 = COA
20 {
wrap = <div class="text image">|</div>
10 = TEXT
10.value = blah
10.wrap = <p>|</p>
20 = IMAGE
20.file = blah
}
}
Just my 2 TS cents
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-english
mailing list