[TYPO3-dev] Template integration in own extension

Philipp Hoffmann phil at mertenmedia.de
Wed Jun 17 15:46:35 CEST 2009


Hello together,
I try to integrate templates in my extension using the BE flexform.
Unfortunatelly the code below doesn't work.
But when I integrate the variable $fileRessourcePath instead of 
$templatefile
it works fine.
The two variables do, as far as I can see in the output, contain exactly the 
same.

It would be great if someone could help me.


$piFlexForm = $this->cObj->data['pi_flexform'];

 if (!empty($piFlexForm)) {
    $templatefile = substr($piFlexForm,strpos($piFlexForm,'/html/')+6);
    $templatefile = $piFlexForm;
    $fileRessourcePath = "fileadmin/templates/ph_fewo/phfewo_template.html";
    $this->template=$this->cObj->fileResource('$templatefile');
} else {
       $this->template=$this->cObj->fileResource('EXT:'.$this->extKey.'/template.html');
}
 






More information about the TYPO3-dev mailing list