Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
   eZ Publish 4.x / legacy

eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Version compatibility

This Twig helper is available as of eZ Publish 5.3 / 2014.03



"input"|ez_file_size() is a Twig helper ( Twig filter ) which is mostly a byte calculator. This will convert a number from byte to the correct suffixe ( from B to EB ). The output pattern will also vary with the current language of the site access ( e.g. choosing between coma or point pattern ).

It returns a String.

The byte factor is 1000 instead of 1024 to be more usual for users.

Prototype and Arguments

 integer input|ez_file_size( integer decimal   )

Argument nameTypeDescription
inputintegerThe number in byte we want to convert
The number of decimal we want our output to have


Using the field identifier as parameter




  • No labels