[TYPO3] cObj is not there.....

Christopher bedlamhotel at gmail.com
Thu Mar 16 23:20:30 CET 2006


Hi,

On 3/16/06, Marcel Trichét <matri at freenet.fr> wrote:
> Hi all,
>
> just trying a little extension stuff.
>
> In my main function I have:
>
> $code = $this->cObj->fileResource($this->conf['templateFile']);
>
>
> But when I debug code its _always_ empty!
>
> $conf templatefile has the right file init. it also exists.
>
> t3lib_div::debug($this->conf['templateFile']);
> # this gives me the filename, that OK!
>
> t3lib_div::debug($this->cObj->fileResource($this->conf['templateFile']));
> # this gives me debug, thats not OK!
>
>
> Seems like no cObj is present?!?!
>
> Any suggetsions what I am missing?
>

A quick look at the TSref suggests that your syntax is wrong [1].

The example given in the TSref goes like this:

page.10 = FILE
page.10.file = fileadmin/gs/gs.html

...which makes me think that your code should be something more like:

$code = $this->cObj->FILE($this->conf['templateFile']);

...especially since fileResource is not a cObject.

-Christopher

[1] http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/8/5/



More information about the TYPO3-english mailing list