Feature #93099
closedAllow usage of commaseparated list in for-Viewhelper in Fluid
0%
Description
I use flex-field, to define some static datas für my content-Element.
I use a select
-field with renderType selectMultipleSideBySide
in my flexform.
I get a comma-separated list.
It would be fine, if the for-Viewhelper could manage comma-separated lists.
I added a patch for a better for-viewhelper.
Suggestion in patch1:
You can use the setting of the delimiter as a needed flag, to analyse a string. Then the programmer must define a delimiter, if he wants that his for-viewhelper should explode a string to an array, if a string is given.
Files
Updated by Dieter Porth almost 4 years ago
I forgot the parameter each in the registration.array
must converted to mixed
.
Updated by Christoph Lehmann almost 4 years ago
I would use an explode ViewHelper for this:
https://viewhelpers.fluidtypo3.org/fluidtypo3/vhs/1.3.2/Iterator/Explode.html
The ViewHelper can create an array from a comma separated list.
Updated by Georg Ringer almost 4 years ago
- Status changed from New to Rejected
Thanks for creating this issue and feature request.
We try hard to remove such type mixture where one variable can be a string or or an array. Edge cases which need to be solved when having string are:
- which char is used for separating? So another option is needed
- should the items be trimmed or not? Another option needed.
As pointed out, please transform the string yourself with mentioned ViewHelper or an own one.