Project

General

Profile

Actions

Bug #88478

closed

INCLUDE_TYPOSCRIPT condition parameter not evaluating symfony expressions

Added by Christian Eßl over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2019-06-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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"]">

Actions #1

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 == 
Actions #2

Updated by Jan Stockfisch over 5 years ago

  • Status changed from New to Needs Feedback
Actions #3

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.

Actions #4

Updated by Christian Eßl about 5 years ago

I think this can be closed!

Actions #5

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.

Actions

Also available in: Atom PDF