[Neos] show content in template if path exists
Tina Eckhorst
t.eckhorst at magent.de
Mon Nov 17 10:32:01 CET 2014
Quote: Henjo Hoeksma wrote on Fri, 14 November 2014 14:23
----------------------------------------------------
> On 2014-11-14 13:01:06 +0000, Tina Eckhorst said:
>
> > Hi,
> >
> > is there a way to check in the template if a content path exists and
> > only show the content if it does?
> >
> > Something like this:
> > <f:if condition="{content.teaser}">
> > {content.teaser -> f:format.raw()}
> > </f:if>
> >
> > I'm new to Neos and not quite sure how to handle this.
> > Thanks!
>
> Hi Tina,
>
> this if statement looks perfectly healthy to me...
>
> See the wiki for some details too:
> http://wiki.typo3.org/Fluid#f:if.2C_f:then.2C_f:else
>
> Oh, and welcome! Please give us your feedback!
>
> --
> Kinds regards,
>
> Henjo
----------------------------------------------------
Hi Henjo,
thanks! I guess the problem is not the if statement but to check if the path exists. Teaser content is not assigned to all my pages and for those without I get a rendering exception.
More information about the Neos
mailing list