Bug #88478
closedINCLUDE_TYPOSCRIPT condition parameter not evaluating symfony expressions
0%
Description
There is a "condition"-Parameter for the include-instruction for importing TS files only if a TS condition is matched. These appear to not allow for symfony expressions at the moment.
Example:
This is working (old syntax):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext = Development]">
This is not working (symfony expression):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == "Development"]">
Updated by Jan Stockfisch over 5 years ago
Christian Eßl wrote:
This is not working (symfony expression):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == "Development"]">
Hi Christian,
Try using single quotes inside the double quotes. While using quotes, your code should work as expected. Otherwise escaping will work too.
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == 'Development']">
OR
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == \"Development\"]">
Using double quotes inside double quotes will result in an expression like this:
[applicationContext ==
Updated by Jan Stockfisch over 5 years ago
- Status changed from New to Needs Feedback
Updated by Riccardo De Contardi about 5 years ago
Hi, the documentation has been updated: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/TypoScriptSyntax/Syntax/Includes.html
Do you think this is sufficient to consider this issue closed or is there something that should be investigated further?
Thank you for your answer and sorry for the late reply.
Updated by Riccardo De Contardi about 5 years ago
- Status changed from Needs Feedback to Closed
Closed in agreement with the reporter.
Thanks for the quick reply.