I installed DCE for custom content elements.
I would like a first div tag set conditionally including the filename. This should do it, but it doesn't - why?
<f:if condition="{f:count(subject: {dce:fal(field:'bgImage', contentObject:contentObject)})}==1">
<f:then>
<f:for each="{dce:fal(field:'image', contentObject:contentObject)}" as="fileReference" iteration="iterator">
<f:if condition="{iterator.isFirst}">
<div class="element slide vertical-center picture{f:if(condition: '{field.isWhite} == 1', then: ' white')}" img-fill="{f:uri.image(src:'{fileReference.uid}',treatIdAsReference:'1')}" selectable>
</f:if>
</f:for>
</f:then>
<f:else>
<div class="element slide vertical-center{f:if(condition: '{field.isWhite} == 1', then: ' white')}" selectable>
</f:else>
</f:if>
What I need:
I defined a FAL property in DCE and if a file is set, the 'div' should be
<div class="element slide vertical-center picture" img-fill="FILEPATH" selectable>
if not it should be
<div class="element slide vertical-center" selectable>
I did not find a netter solution than this structure:
<f:for each="{dce:fal(field:'image', contentObject:contentObject)}" as="fileReference" iteration="iterator">
<f:if condition="{iterator.isFirst}">
<!-- render image by fileReference -->
</f:if>
</f:for>
I already found the inline notation
{f:if(condition:'{filepath} != EMTPY',then:' picture')}
But how do I check for EMPTY in fluid?
{f:if(condition:'{filepath}',then:' picture')}
When I correctly understood Urs in the comments.
What do I miss?