[TYPO3-mvc] if viewHelper with or logic?
Ulrich Lorenz PHZ Luzern
lorenz.ulrich at phz.ch
Tue Jun 29 12:58:09 CEST 2010
Hi everyone
This is a partial follow-up to last year's "How to use If-ViewHelper
with other than true/false". I'm using Fluid for the frontend output of
a classic pi_base plugin, so I assign an array with data to the Fluid
renderer.
My template has the following structure:
<h2>Hintergrund</h2>
<f:if condition="{singledata.praxisberichte}">
<f:then>
<h3>Praxisberichte</h3>
<f:format.html>{singledata.praxisberichte}</f:format.html>
</f:then>
</f:if>
<f:if condition="{singledata.referenzkonzepte}">
<f:then>
<h3>Referenzkonzepte</h3>
<f:format.html>{singledata.referenzkonzepte}</f:format.html>
</f:then>
</f:if>
<f:if condition="{singledata.herausforderungen}">
<f:then>
<h3>Aktuelle Herausforderungen</h3>
<f:format.html>{singledata.herausforderungen}</f:format.html>
</f:then>
</f:if>
Now I would like to have the <h2> title only displayed if one of the
contents below is set. So I'm looking for a syntax like:
<f:if condition="{singledata.praxisberichte} ||
{singledata.referenzkonzepte} || {singledata.herausforderungen}">
Is there any possibility to have this done with Fluid or is it just bad
style?
Thanks for any hint.
Lorenz
More information about the TYPO3-project-typo3v4mvc
mailing list