[TYPO3] Different HTML templates depending on optional right column

Tyler Kraft headhunterxiii at yahoo.ca
Wed Nov 7 16:33:51 CET 2007


> That's what I hate about TS.
> I get no understanding about the different types of elements and which 
> one can be replace by another. it is a lot of trial and error :-(
> and only on the error I find an explanation for the error afterwards.

That's not true actually. TSref is really good once you learn how to 
read it properly - and that might take some time. ;-)

In this case we're creating a big COA that we replace into the page.10 
We could replace in anything - a TEXT object or a HMENU object or a 
TEMPLATE object or as in this case a COA. So our COA will just have 2 
parts and depending on the return form our if statement only one of them 
will ever be shown.

For our COA each subpart of it will be a COA as well (we often will have 
to do things like this so we can make use of stdWrap, wrap or if) And 
within that COA we will have a TEMPLATE part. Now the inner part of the 
COA is a TEMPLATE content object. In a TEMPLATE object we can have the 
properties of file, subparts, marks, etc and we also have a sub-property 
of template which is a cObject.

So when we define temp.XXX.template=FILE we are saying it is a file 
content item. So we look at the file content item and we see its 
sub-property "file" has the data type of resource. So then if we look at 
the datatype reference of TSref we see that the resource datatype can 
only be a file name/path.

Which is why TEXT doesn't work there - see simple!


More information about the TYPO3-english mailing list