[TYPO3-german] Viehelper für Ausgabe der Endung einer Datei

Philipp Holdener philipp.holdener at me.com
Wed Nov 5 15:58:10 CET 2014


Am 05.11.14 15:45, schrieb Philipp Holdener:
> Am 05.11.14 11:19, schrieb bernd wilke:
>> <f:debug title="download">{download}</f:debug>
>> <f:debug title="download.datei">{download.datei}</f:debug>
>
>
> Das gibt mir zbsp das hier aus
>
>
>
> download
>
> array(3 items)
>     datei => 'file:273' (8 chars)
>     name => 'Name der Datei 1' (16 chars)
>     typ => 'img12' (5 chars)
>
> download.datei
>
> 'file:273' (8 chars)
>
> download
>
> array(3 items)
>     datei => 'file:269' (8 chars)
>     name => 'Name der Datei 2' (16 chars)
>     typ => 'img14' (5 chars)
>
> download.datei
>
> 'file:269' (8 chars)
>
> download
>
> array(3 items)
>     datei => 'file:269' (8 chars)
>     name => 'Name der Datei 3' (16 chars)
>     typ => 'img13' (5 chars)
>
>
>


Ich hab jetzt nochmals dein Beispiel angeschaut und mit

<v:var.set name="fileExtension">
					<f:cObject 
typoscriptObjectPath="lib.fileExtension">{dce:typolinkUrl(parameter:'{download.datei}') 
-> v:format.trim(characters: '/')}</f:cObject>
				</v:var.set>


und

lib.fileExtension = TEXT
lib.fileExtension {
   current = 1
   orderedStdWrap {
     # nur Dateiendung:
     10.substring = -3,255
     20.case = upper
   }
}


bekomm ich die Ausgabe PDF, JPG oder OCX... super.


Bei OCX müsste eigentlich DOCX stehen .. aber das hängt wohl mit dem -3 
zusammen. Aber das geht auch so.. so hab ich DOC und OCX für worddokumente

Super.. Herzlichen Dank


Gruss
Philipp





More information about the TYPO3-german mailing list