[TYPO3] How to handle design when center-content changing

Anders Axelsson anders at anax.nu
Sun Sep 23 20:47:28 CEST 2007


Thank you for giving me that info.

I try to get my way of thinking about Typo3/Templavoila correct.
A big help would be if someone could tell me something about how I 
should do and not only how I should not do.

It seems that my main problem is that I do not know how I can add text 
(html) into an element.
I have a data element mapped to a Div-tag and set up so I can edit text 
that are placed there, but I do not know how I can place text (html) 
there from a php-function so that different subpages call different 
php-functions (if any) so the subpages look differently according to 
what I want to have on them.

I got:
page.10 = USER
page.10.userFunc = user_yourfunc

Where do I place this code and how do I get the return-value into the 
element?

Thank you for helping.

Dmitry Dulepov [typo3] wrote:
> Hi!
>
> Anders Axelsson wrote:
>   
>> If I would like to set some text, using TypoScript, in an mapped element 
>> called "Ingress" I would imagine it done like this:
>> page = PAGE
>> page.Ingress.10 = TEXT
>>     
>
> PAGE has no property named "Ingress". This will not work. Take a look to TSRef to see what properties PAGE has.
>
>   
>> page.Ingress10.value = Hello world
>>
>> (setting it from the TSConfig-box on the subpage)
>>     
>
> Will not work either because TSConfig serves completely different purpose and does not know about PAGE at all.
>
>   
>> What would like is to execute a PHP-function and set the returning data 
>> in the element ("Ingress"), but as a start I need to get the above to work.
>>     
>
> page.10 = USER
> page.10.userFunc = user_yourfunc
>
>   
>> Is this a difference since I'm using TemplaVoila?
>>     
>
> Well, it will be different in any case because whay you do now is not how it should be done in typo3 :) TS does not allow you any property. It requires specific properties to be set. You cannot just set whatever you want and get it working - it will not. You must follow precize syntax.
>
> TemplaVoila allows you easily change templates without a need to write TS for each marker. This if you have 100 designs on a site, you do not have to create 100 different TS templates on the site. It will be just one TS template for everything and one field changing in page properties for each new design.
>
>   


More information about the TYPO3-english mailing list