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

Dmitry Dulepov dmitry.dulepov at gmail.com
Tue May 11 11:55:35 CEST 2010


Hi!

JoH asenau wrote:
> So could you give us an example how you would do it to get the same output?

Sure:

==========================
lib.myObject = TEXT
lib.myObject = hello <p>... ...</p>
==========================

:D

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:

==========================
lib.myObject = COA {

	10 = COA
	10 {
		10 = TEXT
		10.value = Hello, world!
	}

}
==========================

Yes, I saw lots of TS written this way. It is not uncommon. My better
version is:

==========================
lib.myObject = TEXT
lib.myObject = Hello, world!
==========================

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.

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 core&security teams member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/


More information about the TYPO3-english mailing list