[TYPO3-english] TS match condition problem

Fernando Arconada falcifer2001 at yahoo.es
Sun Dec 20 23:28:58 CET 2009


My problem: I need to load a JS lib if a FCE is inserted. I saw an 
example about how to to do that with:

page.headerData.20 = TEXT
page.headerData.20.value= <script type="text/javascript" src="/ 
page.headerData.20.if {
	value.data = register:includeSwfObject
	equals = 1

but, how can if i do that with page.includeJS

TYPO3 4.3 has improvements related with page renderer and JS/CSS 
including and i preffer includeJS or includeFooterJS over headerData

any ideas? 

El Sun, 20 Dec 2009 20:56:52 +0100, JoH asenau escribió:

>> I'm trying to write a template like this
>> page.5 = LOAD_REGISTER
>> page.5.something=1
>> [globalVar = TSFE:register|something=1] #....
>> [global]
>> But this contion is never fired. I've tried to debug a bit and I found
>> that when the condition is evaluated at
>> class.t3lib_matchcondition_frontend.php the array
>> $GLOBALS['TSFE']->register only have the entry SYS_LASTCHANGED at the
>> end of pagegen.php file it is set ok
>> Are there any kind of problem with my code or with matchcondition code?
> Well - since TypoScript gets parsed before it is "executed", the order
> is wrong.
> You can't set a register via TypoScript and then match a condition since
> the condition will be checked while parsing. So you should go for a CASE
> or mabe "if" instead.
> Joey
> --
> Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no
> clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian
> Xing: http://contact.cybercraft.de
> Twitter: http://twitter.com/bunnyfield TYPO3 cookbook (2nd edition):
> http://www.typo3experts.com

More information about the TYPO3-english mailing list