[Typo3] levelmedia with text file
Peter Klein
peter at umloud.dk
Tue Dec 6 13:14:31 CET 2005
Hi Sean. An easy option would be to create a small userfunction to display
the file..
Create a file named 'user_func.inc' in your fileadmin dir, and fill it with
this content:
-- cut --
<?
class user_userFunc{
function displayMediaFile($content,$conf) {
$fconf = array(
'file' => $content
);
$content = $this->cObj->FILE($fconf);
return $content;
}
}
?>
-- cut --
Then in your Typoscript SETUP field, you use the userfuinction like this:
-- cut --
// Load the userfunction
includeLibs.displayMediaFile = fileadmin/user_func.inc
lib.displayMediaFile = COA
lib.displayMediaFile {
10 = TEXT
10.field = media
10.listNum = 1
10.wrap = uploads/media/
// Parse the content thru our userfunction before displaying it
10.postUserFunc = user_userFunc->displayMediaFile
}
page.1 < lib.displayMediaFile
-- cut --
--
Peter Klein/Umloud Untd
"Sean Ellis" <sellis at telus.net> skrev i en meddelelse
news:mailman.1.1133810458.18788.typo3-english at lists.netfielders.de...
> Peter Klein wrote:
>> Hi Sean. What you are trying to do, isn't possible, as:
>>
>> * The FILE object doesn't support the "import" property ( Its' an
>> imgResource property)
>> * The FILE objects "file" property, doesn't accept parameters, only a
>> string value..
>>
>
> Well, that's, unfortunately, clear enough.
>
> Thanks, Peter
>
> Sean
More information about the TYPO3-english
mailing list