[TYPO3-mvc] Fluid conditions with logical OR/AND?

Alexander Dick alex at dick.at
Mon Sep 20 16:44:45 CEST 2010


Thank you Bastian! 

Indeed I did it in the meantime with a method in my model, as you suggested. 

	public function getHasTextChanges() {
		return ($this->getFontHighlight() || $this->getFontText());
	}

and then
<f:if condition="{item.hasTextChanges}">...

Best regards
Alex

On Mon, 20 Sep 2010 16:27:21 +0200, Bastian Waidelich <bastian at typo3.org> wrote:
> Alexander Dick wrote:
> 
> Hi Alexander
> 
>> how do I accomplish something like
>>
>> <f:if condition="{item.foo} || {item.bar}">
> 
> <f:if condition="{item.foo}">
> 	<f:else>
> 		<f:if condition="{item.bar}">
> 			// bla
> 		</f:if>
> 	</f:else>
> </f:else>
> 
> 
>> <f:if condition="{item.foo}&&  {item.bar}">
> 
> <f:if condition="{item.foo}">
> 	<f:if condition="{item.bar}">
> 		// bla
> 	</f:if>
> </f:else>
> 
> 
> ..not very nice, but that's currently the only way to do it.
> But you might also think about refining your domain model and abstract
> the needed condition into a model method.
> 
> HTH
> Bastian
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list