Price formatter with HTML

Hello,

I’m totally new to Sylius & Symfony so sorry for noob question. I need to format all prices with HTML, so that decimal places will be in <small> tag. So price will be formatted as: 11,<small>99</small> € instead of 11,99 €. I did some experiments but without success. Can anybody help me how to achieve this as is should be?

Thanks.

You could make a custom twig function for this. Another option is to use split(',') which will split your number into an array containing [number,decimal]. That way you could render them seperatly.

I do think a custom function is the cleanest solution. There might be some magical way to use functions to achieve this, but i’m not aware of it.