[TYPO3-mvc] NumberChoiceViewHelper

Sebastian Schreiber me at schreibersebastian.de
Sun Feb 20 17:28:25 CET 2011


Hi,
thanks a lot for the hint.
Really, didn´t know that.
So please forget my suggestion and give the viewhelper of Christian 
Zenker a try.

Sebastian

Am 20.02.2011 11:32, schrieb Marc Bastian Heinrichs:
> Hey,
>
>> But we i think in my case we have more than two states:
>> We have at least 0, 1, and infinite+.
>> And i would like to substitute some arguments dynamically.
>>
>> Since i like symfony very much, i converted the
>> NumberChoiceViewHelper of symfony to fluid.
>> With this solution we have to call it this way:
>> <prod:format.numberChoice
>> text="{f:translate(key: 'numberOfArticles', default: '[0]No Articles>
> in this category|[1]There is 1 article in this category|(1,+Inf]There
>> are _number_ articles in this category')}"
>> arguments="{_number_: category.numberOfArticles}"
>> number="{category.numberOfArticles}" />
>>
>> What do you think about it?
> I like the idea of an NumberChoiceViewHelper and Christian Zenker
> already backported the Symfony helper
> http://git.typo3.org/FLOW3/Packages/ViewhelperIncubator.git?a=commit;h=3071aceca9e22280b5cd06d7734c942db8ea79c9
> Btw. same argument names like you used.
>
> But I don't think, that the notation of the conditions follows the
> general approach of fluid.
>
>
> Best
> Marc Bastian
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


-- 
Sebastian Schreiber
(Medieninformatiker)
(TYPO3 Certified Integrator)

Sülzburgstraße 36
D-50937 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 219 / 5302 / 2302



More information about the TYPO3-project-typo3v4mvc mailing list