[TYPO3-german] Verschachtelte if Abfragen in fluid

Philipp Holdener philipp.holdener at me.com
Fri Dec 20 10:27:52 CET 2013


Hallo zusammen

Im folgenden fluid code müsste ich eine zweite Condition einbauen

<f:section name="main">
	<f:if condition="field.bild">
	<f:then>
	<section class="info-box">
			<h2>{field.titel}</h2>
			<div class="photo">
				<f:for each="{field.bild}" as="fileReference">
						<f:image src="fileadmin/{fileReference.identifier}" 
alt="{field.titel}" />
				</f:for>				
			</div>
			<div class="holder">
					<h3>{field.untertitel}</h3>
					<p>{field.text}</p>
					<f:if condition="{field.buttonLink}">
						<f:then>
							<a class="button" 
href="{dce:typolinkUrl(parameter:'{field.buttonLink}')}" 
target="{field.buttonZiel}">{field.buttonText}</a>
						</f:then>
					</f:if>
			</div>
		</section>
		
		
	</f:then>
	<f:else>
	
		<section class="info-box">
			<h2>{field.titel}</h2>
			<div class="holder">
					<h3>{field.untertitel}</h3>
					<p>{field.text}</p>
					<f:if condition="{field.buttonLink}">
						<f:then>
							<a class="button" 
href="{dce:typolinkUrl(parameter:'{field.buttonLink}')}" 
target="{field.buttonZiel}">{field.buttonText}</a>
						</f:then>
					</f:if>
			</div>
	</section>
	
		
	</f:else>
	</f:if>
</f:section>



Momentan hab ich eine Condition die abfragt ob ein Bild vorhanden ist 
und dementsprechend das Markup setzt. Jetzt müsste ich für die Home 
Seite das ganze nochmals anpassen (<f:if condition="{0:page.uid} == 
{0:'1'}">)


Nochmals eine <f:if.></f:if> in <f:then> und <f:else> geht leider nicht.
hat mir jemand einen Tipp wie ich die doppelte Condition hinbekomme?


herzlichen Dank und allseits frohe Festtage

Philipp


More information about the TYPO3-german mailing list