[TYPO3-mvc] Inline-IF-Condition with viewhelper
Franz Koch
typo3.RemoveForMessage at elements-net.de
Wed Mar 9 08:50:45 CET 2011
Hey Armin,
> I've got a question about this line in fluid template:
>
> {f:if(condition: '{c:userInGroup(user:'{comment.author}',
> inGroup:'2')}', then: 'WHOOOOOO!')}
>
> Shouldn't it work? ;-)
not in the way you wrote it. Give that a try:
{f:if( condition: '{c:userInGroup( user: comment.author, inGroup:2 )}',
then: 'WOOOHOOO!' )}
AFAIK you don't need {} around "comment.author" here. If this also
doesn't work you need to escape the inner quotes:
{f:if( condition: '{c:userInGroup( user: \'{comment.author}\', inGroup:2
)}', then: 'WOOOHOOO!' )}
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list