[TYPO3-mvc] if viewhelper and literal strings

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Mar 10 11:42:09 CET 2010


Hi Peter,

> why does the if viewhelper not support strings?
>
> I am quite sure, the way I resolved this issue does break a whole bunch
> of other stuff?
> http://forge.typo3.org/issues/show/6757

I was also in need of this and tried what you tried (although slightly 
different to match only strings encapsulated by '', because anything 
else could be a reference to a template-variable or a object in 
shorthand syntax), but I ran into quite some issues with this IIRC (the 
' where part of the match value and thus didn't evaluate correctly).

My workaround then was a simple "switch/case" viewHelper that I needed 
anyway.

> If so, anyone a suggestion to have a simple if ViewHelper with
> comparison of object-accessor and literal string?

I haven't found a clean solution for this as FLUID limited itself in my 
attempt to solve this, due to it's architecture. And because I was 
running out of time I finally gave up and used my switch viewHelper. So 
I don't have a solution for this atm - but also think this is a 
mandatory feature.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list