[TYPO3-templavoila] condition typoscript tx_templavoila_pi1.current_field

Romain Roy Romain.Roy at infoteam.ch
Fri Dec 17 08:50:23 CET 2010


Hello Chris,

Thanks for your response .

In fact, my situation is the next : 

I've two plugins (same module) in the different column. In my configuration typoscript, I specifie the width et height for the images (the client don't need to insert the value in the flexform).  But I would have that the width and height would like their are different regarding in which column is put.

Example : 

Column 1 = field_content
Column 2 = field_rightcontent


[globalVar= TSFE:register|tx_templavoila_pi1.current_field = field_content]
Plugin.xxxx{
	Width = 300
	Height= 150
}
[END]

[globalVar= TSFE:register|tx_templavoila_pi1.current_field = field_rightcontent]
Plugin.xxxx{
	Width = 500
	Height= 250
}
[END]

Thanks for your help

- Romain Roy


-----Message d'origine-----
De : typo3-project-templavoila-bounces at lists.typo3.org [mailto:typo3-project-templavoila-bounces at lists.typo3.org] De la part de Chris Müller
Envoyé : vendredi 17 décembre 2010 08:44
À : typo3-project-templavoila at lists.typo3.org
Objet : Re: [TYPO3-templavoila] condition typoscript tx_templavoila_pi1.current_field

Hi Romain,

where do you want to use the condition? In the data structure xml? As far as I know the use of conditions is not possible in the data structure. But you can use the if condition of typoscript. So this should work:

30 = TEXT 	
30 { 	
     value = Your text
     if.isTrue.data = register:yourregistervalue }

As far as I see you want to check if a field of your data structure is set. So you can use also this code:

30 = TEXT 	
30 { 	
     value = Your text
     if.isTrue.field = field_xxxx
}

As seen above you can also use the following snippet to get the value of field A in field B:

30 = TEXT
30.field = field_a

So you don't have to use register.

Regards,
Chris.

Am 16.12.2010 09:25, schrieb Romain Roy:
> Hello,
>
> Is it possible to add this typoscript ?
>
> [globalVar= TSFE:register|tx_templavoila_pi1.current_field = 
> field_xxxx]
>
> [END]
>
> This condition is never true....
>
> But if I check the value of  field_xxx with :
>
> 10 =TEXT
> 10.data =register : tx_templavoila_pi1.current_field
>
> I've the value !
>
> Have you an idea ?
>
> Thanks for your response
>
> Best regards
>
> Romain
>

_______________________________________________
TYPO3-project-templavoila mailing list
TYPO3-project-templavoila at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-templavoila


More information about the TYPO3-project-templavoila mailing list