-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Moin Sven,
der Vergleichsoperator in <f:if> (und in PHP) ist '==', nicht '='. Gruß Jost On 07/07/2014 02:11 PM, derSven wrote: > Ich habe bei einem Projekt die Anforderung das es die option auf > bis zu 5 bildern geben soll. die bilder je nachdem wie viel es sind > anders angezeigt werden. > > mit hilfe eines wrapper-divs soll das theoretisch klappen. > > nur folgendes template gibt mir alle aus.. und berücksichtigt nicht > das eine oder das andere. > > was mache ich falsch?! > > > schemata: > > if:erstes bild if index größer als 0 dann if total 5 dann wrap mit > class="five" if total 4 dann wrap mit class="three" if total 3 dann > wrap mit class="two" > > ist diese logik falsch?! > > > > > <div id="first_segment-wrapper"> <f:for each="{project.images}" > as="image" iteration="imgIterator"> <f:if > condition="{imgIterator.isFirst}"> <figure><f:image > src="{image.uid}" alt="{image.originalResorce.alternative}" > width="750c" height="500c-90" treatIdAsReference="1"/><</figure> > </f:if> </f:for> > > </div> <div id="more_segment-wrapper"> > > <f:for each="{project.images}" as="image" iteration="imgIterator"> > <!-- ab dem zweitem Bild --> <f:if condition="{imgIterator.index} > > 0"> > > <!-- wenn es insgesamt 3 gibt dann --> <f:if > condition="{imgIterator.total} = 3"> > > <div class="image-wrapper three"> <figure><f:image > src="{image.uid}" alt="{image.originalResorce.alternative}" > width="395c" height="" treatIdAsReference="1"/></figure> </div> > > </f:if> > > > <!-- wenn es insgesamt 2 gibt dann --> > > <f:if condition="{imgIterator.total} = 2"> > > <div class="image-wrapper two"> <figure><f:image src="{image.uid}" > alt="{image.originalResorce.alternative}" width="395c" height="" > treatIdAsReference="1"/></figure> </div> > > </f:if> > > </f:if> </f:for> > > </div> > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlO6j+sACgkQNme/yCvmvTI82ACgx8Ze4JMwO1mf9mwTTYOnZZvs 1JwAn3LSEgB7pK5ADP+sbkmEH/3n2Rm5 =hoqZ -----END PGP SIGNATURE----- _______________________________________________ TYPO3-german mailing list TYPO3-german@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german