[TYPO3] Different HTML templates depending on optional right column

Bernd Wilke xoonsji02 at sneakemail.com
Wed Nov 7 17:19:57 CET 2007


Tyler Kraft schrieb:
> Hi,
> 
>> 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!
> 
>  ;-)

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

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.


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
}

Is there a list of types which can be combined and which will not work 
if brought together?
Or which types can be substituted for others?


Bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list