[TYPO3-german] Fluidtemplate - Dateigrösse ausgeben

Philipp Holdener philipp.holdener at me.com
Fri Dec 13 14:10:25 CET 2013


Hallo Cedric

Besten Dank für dein Tipp.

>   Mit EXT:vhs (ViewHelper Collection /
> https://fedext.net/viewhelpers/vhs.html), geht es echt einfach.
>
> <f:if condition="{product.handbookFile}">
>     <v:var.set name="handbookFileInKb">
>      <v:math.round decimals="2">
>       <v:math.division b="1024">
>        <v:media.size path="{product.handbookFile}"/>
>       </v:math.division>
>      </v:math.round>
>     </v:var.set>
>     <a href="/{product.handbookFile -> v:format.trim(characters: '/')}"
> target="_blank"
>        title="Handbuch {product.name} ( {handbookFileInKb ->
> v:format.trim()}kb )">
>      <img src="{f:uri.resource(extensionName: 'cziel_onlinefabrik', path:
> 'Icons')}/{v:media.extension(file: product.handbookFile)}.jpg"
>        alt=" ">
>     </a>
>    </f:if>
>
> Das könntest Du zB als Section irgendwo in ein Partial auslagern.
>


Ist mein erstes Fluid Projekt. Hab bis anhin nur mit TemplaVoila 
gearbeitet. Kenn mich deshalb noch nicht wirklich damit aus.

Also ich brauch als erstes eine zusätzliche Extension (vhs), korrekt?

Und dann macht das hier das Ganze?

<v:var.set name="handbookFileInKb">
 >      <v:math.round decimals="2">
 >       <v:math.division b="1024">
 >        <v:media.size path="{product.handbookFile}"/>
 >       </v:math.division>
 >      </v:math.round>
 >     </v:var.set>


Gruss
Philipp




More information about the TYPO3-german mailing list