[TYPO3-english] COA inside another COA - is it a wise thing?

JoH asenau info at cybercraft.de
Tue May 11 12:12:51 CEST 2010


>> So could you give us an example how you would do it to get the same
>> output?
>
> Speaking seriously, that example was too generic and it did NOT
> require any COA. There are cases when COAs are necessary. But in most
> cases they can and must be avoided. Example:
>
> Yes, I saw lots of TS written this way. It is not uncommon. My better
> version is:
>
> It all comes to how people code in the most efficient way. Some do
> not and later they say that TYPO3 is slow. Well, their own fault.

There is nothing "generic" about the example I gave you and of course it
doesn't make any sense to put a simple "Hello World" inside a nested COA -
but instead of giving other weird examples how to *not* do it, could you
please answer the questions - How would you do this without COA? What is
unstructured and not easy to understand about it?

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
    }
}

Cheers

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