#71031Fluid if-viewhelper excutes else code if inline syntax?
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.