[TYPO3] Getting template file from flexforms
Dmitry Dulepov [typo3]
dmitry at typo3.org
Thu Sep 20 09:55:21 CEST 2007
Christian Lerrahn wrote:
> I'm trying to set a template file for my extension in the flexforms.
> However, when I select a file or upload one specifically for the
> plug-in, I end up with only the file name in
> $this->cObj->data['pi_flexform'] but not the path. Now, as I don't know
> if the file was directly uploaded in the plug-in configuration or just
> included from somewhere in fileadmin/, I cannot predict that path. How
> can I tell where that file is?
$templateFile = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'field_templateFile');
$this->templateCode = $this->cObj->fileResource($templateFile);
And you get the whole template code.
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-english
mailing list