[TYPO3] Different HTML templates depending on optional right column

Tyler Kraft headhunterxiii at yahoo.ca
Wed Nov 7 17:41:08 CET 2007


Hi,

> Let's see if I got it:
> a COA has no own type of returnvalue. It returns the type of the 
> contained elements.
> mostly these are TEXT and the returnvalue therefore is TEXT

A COA is really just a container for other content types (TEXT, HTML, 
COA, HMENU, etc), and it quickly becomes handy to use for (mainly) 
making use of "if" or "stdWrap".





> in this case we needed the type FILE and had to contain elements of this 
> type, so we can use the temp-object as such.
Sort of. In this case we defined the item as being a FILE content type. 
Therefore we have to look at what the the FILE cObject subpart called 
"file"accepts as a datatype. That is why we check the section on 
datatypes. It says its a resourec datatype, and the datatype section 
says its a file (including paths and also describes how you can use 
wildcards)




> what if a COA returns differnent types?
> temp.x = COA
> temp.x {
>     10 = TEXT
>     10.value = hello
> 
>     20 = HMENU
>     20 {
>         :
>     }
> 
>     30 = TEXT
>     30.value = bye
> }
So what. Its the same as doing each of them seperately and having three 
marks right together in the template.. But all of a sudden you have the 
power wrap them all into one item (therefore one mark in the template, 
or one "if" condition or one wrap or one post user function, etc)

In your example above you'd get:
"hellomenu-herebye" exactly like that

But with the use of some wraps in there also you'd get:
hello<br />menu-here<br />bye


> Is there a list of types which can be combined and which will not work if brought together?

Yeah - all the content types in TSref in the section called Content 
Objects (cObject). And its really handy to learn all this because if you 
look at stdWrap function you can add cObjects all over the place as pre 
and post wraps and in all kinds of other situations.



> Or which types can be substituted for others?
I'm not sure what you mean here...

I would recommend reading TSref more nad trying to understadn how ti all 
fits together, and also the document on TS syntax as it will explain 
more deeply how =< and < work also.


hth


More information about the TYPO3-english mailing list