[TYPO3-mvc] HowTo handle files in .csv list

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Feb 8 11:33:00 CET 2011


On 08.02.2011 11:17, Franz Koch wrote:
> Hi Peter,
>
>> On my current ext this would be quite sufficient for me, but I am
>> thinking about how to resolve that 'abc.png,foobar.gif' issue within
>> extbase/fluid.
>>
>> What should I do?
>> - create a ViewHelper that solves this
>> - fiddel the model and change the field with it's setters() and
>> getters()? (currently it is just string)
>> - fiddel the model and add(!) proper helper methods
>
> for me it depends on how I have to interact with this property. For some
> cases I add the needed logic to the default getters/setters for that
> property. For cases where I also need the original value I add a pair of
> assisting getters/setters.

oh, and if it's just about displaying that stuff a "explode"/split 
viewHelper combined with a for loop might be the cleanest solution:

<f:for each="{p:split(value:object.images, token:',')}" as="image">
	<f:image src="..." />
</f:for>

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list