Bug #9454

If condition in viewhelper attribute

Added by Daniel Lienert over 11 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
Category:
ViewHelpers
Target version:
-
Start date:
2010-08-25
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

It should be possible to set an attribute in a viewhelper by an if condition.

For example i want to set the attribute onchange conditional by an object property:
<f:form.checkBox name="name" value="value" additionalAttributes="{f:if (condition: '{object.submitOnChange}', then: '{onchange : \'submit()\'}')}" />

Fluid throws the exception: #1237900529: The argument "additionalAttributes" was registered with type "array", but is of type "string".


Related issues

Has duplicate TYPO3.Fluid - Bug #42474: Possible bug with short form conditions in viewhelper tagsClosedBastian Waidelich2012-10-29

Actions
#2

Updated by Adrian Föder about 9 years ago

  • Category changed from Core to ViewHelpers
  • Status changed from New to Rejected
  • Assignee set to Adrian Föder
  • Priority changed from Should have to Won't have this time
  • Has patch set to No

compare to #42474; since you want to omit the attribute at all, you have no other choice than to make the whole tag conditional.

Also available in: Atom PDF