[TYPO3-templavoila] Building simple paste functionality to frontend - failing paste - copy

Tapio Markula tapio.markula at atwebteam.com
Wed Feb 7 22:19:54 CET 2007


Hi

I made simple paste functionality to frontend.
I must build a new command handling like
mk_tvfrontend

case 'paste':
				$sourcePointer=t3lib_div::_POST('sourcePointer');
				$destinationPointer=t3lib_div::_POST('destinationPointer');
				$apiClassName = t3lib_div::makeInstanceClassName('tx_templavoila_api');
				$TVObj = new $apiClassName ($sourcePointer['table']);
				
		if(!$sourcePointer['setCopyMode']) { // cut + paste
					$ok = $TVObj -> moveElement_setElementReferences($sourcePointer, 
$destinationPointer);
					
					
					}
		else	{ // paste + copy
					#$ok = $TVObj -> copyElement($sourcePointer, $destinationPointer);
					$ok = $TVObj -> insertElement_setElementReferences 
($destinationPointer, $sourcePointer['uid']);
					
					}
				break;

moveElement_setElementReferences works as expected
but copy doesn't

Any idea to get copy working?
			


More information about the TYPO3-project-templavoila mailing list