[TYPO3-project-formidable] Added the userobj option to property targetdir in FILE renderlet
Jerome Schneider
j.schneider at ameos.com
Mon Jun 11 10:12:03 CEST 2007
Hello Manuel,
I applied your modifications to formidable and its available on SVN now
Thank you :)
Jerome
Manuel Rego Casasnovas a écrit :
> Hello everyone!
>
> I need use an userobj for the property targetdir in a FILE renderlet, my
> XML configuration is the next:
> <renderlet:FILE name="my_file">
> <data>
> <targetdir>
> <userobj>
> <extension>this</extension>
> <method>_getFilePath</method>
> </userobj>
> </targetdir>
> </data>
> </renderlet:FILE>
>
>
> The changes needed for this new option are the next, all this changes in
> the class tx_rdtdate:
> - Modified two functions:
> function getFullServerPath($filename) {
>
> return t3lib_div::fixWindowsFilePath(
> t3lib_div::resolveBackPath(
> t3lib_basicFileFunctions::slashPath(PATH_site) .
> t3lib_basicFileFunctions::slashPath($this->_getTargetDir()) . $filename
> )
> );
> }
>
> function getRelWebPath($filename) {
> return t3lib_div::resolveBackPath(
> t3lib_basicFileFunctions::slashPath($this->_getTargetDir()) .
> $filename
> );
> }
>
> - Added a new funcition:
> function _getTargetDir() {
>
> $mTargetDir = $this->oForm->_navConf("/data/targetdir/",
> $this->aElement);
>
> if(is_array($mTargetDir) && array_key_exists("userobj",
> $mTargetDir)) {
> $mTargetDir = $this->oForm->_callUserObj($mTargetDir);
> }
>
> return $mTargetDir;
> }
>
>
> You can add this new option to the future new FORMidable release ;-)
>
>
> Best regards,
> Rego
>
> --
> http://www.igalia.com
More information about the TYPO3-project-formidable
mailing list