Feature #24627
Updated by Felix Kopp almost 10 years ago
When the normal clipboard (accessible through the Web>List module) contains elements, the context menu on pages has a new entry called "Paste into". If the element in the clipboard is a page, we have "Paste into" and "Paste after". This also respects the current setting of the clipboard ("Copy" or "Move"). This should be implemented in the new context menus that we have in the new page tree, as this is a missing feature from the old tree. Copied from a mail of Ernesto regarding this topic: Im alten Click-Menu (alt_clickmenu.php) geht das so: In main() wird der Clipboard vorbereitet und der "normale Clipboard" aktiviert (wo nur ein Element rein passt, a la Windows): // Initialize Clipboard object: $clipObj = t3lib_div::makeInstance('t3lib_clipboard'); $clipObj->initializeClipboard(); $clipObj->lockToNormal(); // This locks the clipboard to the Normal for this request. Hier kommt die Entscheidung, ob es was zu pasten gibt. "Pages" haben die Besonderheit, dass man "Paste after" und "Paste into" machen kann, alle anderen einfach nur "Paste into": // Paste: $elFromAllTables = count($this->clipObj->elFromTable('')); if (!in_array('paste',$this->disabledItems) && $elFromAllTables) { $selItem = $this->clipObj->getSelectedRecord(); $elInfo=array( t3lib_div::fixed_lgd_cs($selItem['_RECORD_TITLE'],$BE_USER->uc['titleLen'] ), ($root?$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']:t3lib_div::fixed_lgd _cs(t3lib_BEfunc::getRecordTitle($table,$this->rec),$BE_USER->uc['titleLen' ])), $this->clipObj->currentMode() ); if ($table=='pages' && ($lCP & 8)) { if ($elFromAllTables) $menuItems['pasteinto']=$this->DB_paste('',$uid,'into',$elInfo); } $elFromTable = count($this->clipObj->elFromTable($table)); if (!$root && !$DBmount && $elFromTable && $TCA[$table]['ctrl']['sortby']) $menuItems['pasteafter']=$this->DB_paste($table,-$uid,'after',$elInfo); } Die "Aktion" ist dann einfach diese URL aufzurufen: $this->clipObj->pasteUrl($table, $uid, 0) (issue imported from #M17099)