Commit 779ce6c8 authored by Andy Hausmann's avatar Andy Hausmann

Moved condition to a higher level to avoid the script being printed in case of no FlexSlider items.

parent 0da4dec2
...@@ -4,53 +4,53 @@ ...@@ -4,53 +4,53 @@
<f:section name="main"> <f:section name="main">
<f:render partial="ResourceFiles" arguments="{settings: settings}"/>
<f:render partial="JavaScript" arguments="{settings: settings, data: data}"/>
<f:flashMessages /> <f:flashMessages />
<f:if condition="<f:count subject='{flexSliders}' /> > 0"> <f:if condition="<f:count subject='{flexSliders}' /> > 0">
<div class="flexslider" id="{data.uid}"> <f:render partial="ResourceFiles" arguments="{settings: settings}"/>
<ul class="slides"> <f:render partial="JavaScript" arguments="{settings: settings, data: data}"/>
<f:for each="{flexSliders}" as="slide"> <div class="flexslider" id="fs-{data.uid}">
<li> <ul class="slides">
<f:if condition="{slide.link}">
<f:then> <f:for each="{flexSliders}" as="slide">
<f:link.page pageUid="{slide.link}"> <li>
<f:if condition="{slide.link}">
<f:then>
<f:link.page pageUid="{slide.link}">
<f:image
src="uploads/tx_flexslider/{slide.image}"
alt="{slide.caption}"
width="{settings.images.width}" height="{settings.images.height}"
minWidth="{settings.images.minWidth}" minHeight="{settings.images.minHeight}"
maxWidth="{settings.images.maxWidth}" maxHeight="{settings.images.maxHeight}" />
</f:link.page>
</f:then>
<f:else>
<f:image <f:image
src="uploads/tx_flexslider/{slide.image}" src="uploads/tx_flexslider/{slide.image}"
alt="{slide.caption}" alt="{slide.caption}"
width="{settings.images.width}" height="{settings.images.height}" width="{settings.images.width}" height="{settings.images.height}"
minWidth="{settings.images.minWidth}" minHeight="{settings.images.minHeight}" minWidth="{settings.images.minWidth}" minHeight="{settings.images.minHeight}"
maxWidth="{settings.images.maxWidth}" maxHeight="{settings.images.maxHeight}" /> maxWidth="{settings.images.maxWidth}" maxHeight="{settings.images.maxHeight}" />
</f:link.page> </f:else>
</f:then> </f:if>
<f:else> <f:if condition="{settings.showCaption} > 0">
<f:image <p class="flex-caption">
src="uploads/tx_flexslider/{slide.image}" <f:if condition="{slide.title}">
alt="{slide.caption}" <strong>{slide.title}</strong>
width="{settings.images.width}" height="{settings.images.height}" </f:if>
minWidth="{settings.images.minWidth}" minHeight="{settings.images.minHeight}" <f:if condition="{slide.subtitle}">
maxWidth="{settings.images.maxWidth}" maxHeight="{settings.images.maxHeight}" /> <span>{slide.subtitle}</span>
</f:else> </f:if>
</f:if> </p>
<f:if condition="{settings.showCaption} > 0"> </f:if>
<p class="flex-caption"> </li>
<f:if condition="{slide.title}">
<strong>{slide.title}</strong> </f:for>
</f:if> </ul>
<f:if condition="{slide.subtitle}"> </div>
<span>{slide.subtitle}</span>
</f:if>
</p>
</f:if>
</li>
</f:for>
</ul>
</div>
</f:if> </f:if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment