In my typo3 extension I got a double value saved via backend. I want to put this value out in the frontend.
I want the double to be formated to use the german ',' as decimal seperator (and a max precision of 1). So I used f:format.number
viewhelper to set this. However that fluid helper ist setting fixed decimals. I want dynamic decimals, as in I do not want any trailing 0s. 4.0 ought to be shown as 4.
If I do not use the viewhelper (thus outputting the raw data) the behaviour is as desired. 4.0 shows as 4, however it also does show 4.5 as 4.5 not as 4,5.
Is there a way to 'unfix' the decimals in the viewhelper? I also tried to wrap my output in if conditions to check via modula, but this never returns a positive.
How do I output formated doubles on a precision without trailing zeros?