Skip to content

Ternary expressions behaviour #1355

Description

@MajPay

I implemented the following code some time ago (Late 2024) and i don't know if it was fluid 4 or fluid 2:

<f:someViewHelper someArgument="{
    key: '{object.0.props.foo ? object.0.props.foo : defaultValue}'
}" />

It does currently not work anymore (project using fluid 2), i have to change to:

<f:someViewHelper someArgument="{
    key: '{f:if(condition: object.0.props.foo, then: object.0.props.foo else: defaultValue)}'
}" />

Is this something, that is different in 2/4, did something change/break?

The documentation only states, that no static value can be used, but does not specify any other limitation:
https://docs.typo3.org/permalink/fluid:ternary-expressions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBreaking change, which requires deprecation and major release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions