[TYPO3-dev] Manually adding CE
J. Lingott
jbl at deweblop.de
Wed Sep 1 10:36:11 CEST 2010
Stefano Kowalke wrote:
> Hey,
>
> what do you mean with "manually"? Do you execute your SQL statement
> directly inside the phpmyadmin/mysql cli or from inside an extension?
>
> If you use Templavoila, I recommend the TV API to you in other case
> there is the process_datamap() functions for this case.
> Personally I never create CEs with negative pids, but I saw it in the
> database.
>
> Don't know if the TV API or process_datamap() provide this.
>
> Regards
> Stefano
Hi,
what I refered to with manually was implementing my own save routine
rather than using the default save routine and hooking it by implemting
processDatamapClass. It is necessary as I am using an ajax request for
storing the CE. But I meanwhile skipped the negative PID (which was
meant to connect the CE to another) and implemented system folders to
store the CE. Moreover the process_datamap method even fails using
negative PIDs. Am now initializing a data array and use an invokation of
t3lib_tcemain, using its start and process_datamap methods.
It all works nicely, just stumbled over one problem when using list
CType on the incomingFieldArray and it occurs in the method
fillInFieldArray. After processing this method the list_type field is
set to an empty string. Couldn't really track it down, but is there a
reason for doing that?
Am now using a workaround and hook processDatamap_postProcessFieldArray,
where I am just setting it back to the value it had before. But I would
be happy to remove this workaround again.
Cheers and thanks for your reply Stefano,
J. Lingott
More information about the TYPO3-dev
mailing list