Project

General

Profile

Actions

Bug #71031

closed

Fluid if-viewhelper excutes else code if inline syntax?

Added by Henri Nathanson about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2015-10-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The problem I had today was with this view helper inline notation. The banner is not set. The value for bannerImage is empty string ''. The rendering runs into an file reference not found error. What comes by the uri.image() call. Problem is, the invalid 'then' blocks code is executed.

style="{f:if(condition:settings.display.bannerImage,
           then:'background-image: url({f:uri.image(src: settings.display.bannerImage, treatIdAsReference:1, height:700px)})'
       )}" 

This fixes it:
style="<f:if condition="{settings.display.bannerImage}">background-image: url(<f:uri.image src="{settings.display.bannerImage}" treatIdAsReference="1" height="700" />)</f:if>

Maybe I am missing something here? Could it really be the inline notation is less reliable here? Thx for comments.

Actions

Also available in: Atom PDF