[TYPO3-german] per cObjGetSingle nur den Bildpfad bekommen

Helmut Hummel typo3 at jhpc.de
Thu Jan 3 00:42:05 CET 2008


Steffen Kamper schrieb:
> 
> oh mann, ist schon spät ...

hehe, stimmt ;)

> also laut source wird das Bild mit IMG_RESOURCE gerendert und das Array 
> $GLOBALS['TSFE']->lastImgResourceInfo befüllt, also
> 1)  IMG_RESOURCE  nutzen
> 2) $GLOBALS['TSFE']->lastImgResourceInfo  befragen
> 
> dann sollte alles korrekt sein.

Also Zitat[1]:
-------------
IMG_RESOURCE
This does the same as the IMAGE cObject but the very important
difference is that the <IMG>-tag is not wrapped around the file.

Example:

page.10 = IMG_RESOURCE
page.10 {
  file = fileadmin/tsbyex/alligator.jpg
  file.width = 200
}

outputs:

typo3temp/3de305c72b.jpg
--------------

Ergo:

# Bildkonfiguration fuer das Icon der Farben
farbIcon = IMAGE_RESOURCE
farbIcon {
 file =
 file {
   maxW = 30
   maxH =
 }
}
$this->conf['farbIcon.']['file'] = 'uploads/tx_bla/'.$data['icon'];
$farbIcon =
$this->cObj->cObjGetSingle($this->conf['farbIcon'],$this->conf['farbIcon.']);

Sollte also funktionieren...

[1]http://typo3.org/documentation/document-library/core-documentation/doc_core_tsbyex/0.0.16/view/5/1/#id3044326

-- 
lib.salutation = TEXT
lib.salutation.value = Kind regards, Helmut
lib.salutation.lang.de = Viele Grüße, Helmut


More information about the TYPO3-german mailing list