[Typo3-dev] Typos content rendering functions

Robert Lemke rl at robertlemke.de
Sat Aug 23 09:19:11 CEST 2003


Sacha Vorbeck wrote:
> Only the images are left:
> the only information about images in the tt_content table was the
> blob-field image that contains the image name. But no information
> about size, alt text and stuff. So this must be set with typoscript.

> But I`d rather like to not use typoscript in this case.

Why not? Just generate the TS in your script and use one of the cObj
functions
(see class.tslib_content.php). Try this:

    $lConf = array ();
    $lConf["params"] = 'hspace=1 vspace=1';
    $lConf["file."]["maxW"] = 100;
    $lConf["file"] = 'uploads/'.$blob_field_containing_filename;
    $imgCode = $this->cObj->cImage($lConf["file"],$lConf);

If you uploaded the image into a field of your own extension (not
tt_content)
you'd have to modify the path of course:

    $lConf["file"] =
'uploads/'.$this->extPrefixId.'/'.$blob_field_containing_filename;

-- 
robert






More information about the TYPO3-dev mailing list