[TYPO3-english] multiple conditions

Christian Hennecke christian.hennecke at wunderknaben.com
Tue Jan 22 10:53:10 CET 2013


Am 21.01.2013 19:45, schrieb Katja Lampela:
> Hi,
>
> In extension browser the ajax is imported into page object with some
> conditions (shown below) and I would want to add my condition into it:
> import it into all the other browsers but not to Internet Explorer
> versions below 9.
>
> So here's the ts:
>
> // AJAX page object
> [browser = msie] && [version => 9] || [globalString =
> GP:tx_browser_pi1|segment=single] || [globalString =
> GP:tx_browser_pi1|segment=list] || [globalString =
> GP:tx_browser_pi1|segment=searchform]
> // Don't handle header of content element
> lib.stdHeader >
> // Don't wrap content element with a default div
> tt_content.stdWrap >
> // Don't prefix the content element with a comment
> tt_content.list.20.stdWrap.prefixComment >
> // Remove the current page obeject
> page >
> // Create a page object for AJAX
> page < plugin.tx_browser_pi1.javascript.ajax.page
> [global]
> // AJAX page object
>
>
> I have added only the first [browser = msie] && [version => 9]
> but this doesn't work. Ajax is imported into all IE versions.
>
> What am I doing wrong?

Your condition is true if the browser is IE >= 9 or one of the variables 
is set. Unfortunately, TypoScript does not allow nesting nor the complex 
condition you need. You could use a user function or save the original 
settings to temporary objects and restore them after the AJAX setup if 
the browser is IE < 9. I think a user function is the most effective way 
to go here.


More information about the TYPO3-english mailing list