简体   繁体   中英

typoscript condition on get parameter

I'm trying to include separate setup.ts files, based on a "custom" GET parameter, but no matter I give ?custom=1 or not, the code always enters the ELSE clause and I get "bbb" on top of the page. Where am I wrong?

[globalVar = GP:custom = 1]
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/templates/typoscript/CUSTOM/setup.ts">
page.1 = TEXT
page.1.value = aaa
[else]
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/templates/typoscript/setup.ts"> 
page.1 = TEXT
page.1.value = bbb
[end]

It looks like it's impossible for included files:

https://forge.typo3.org/issues/29583

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM