[TYPO3-dev] Symlink for Filelist

christian reiter cr at cxd.de
Fri Oct 26 16:02:28 CEST 2007


Hello,
 > starting point how to create a new entry in the filelist context menu

generally you can extend the clickmenu through a function 
processingByExtClassArray that is callen in printFileClickMenu and 
printDBClickMenu. There is also a function 
externalProcessingOfFileMenuItems but I don´t quite see how it works as 
it doesn´t call an externally defined class.

For processingByExtClassArray you can set something like

$GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][]=array(
'name' => 'tx_myext_cm',
'path' => t3lib_extMgm::extPath($_EXTKEY).'class.tx_myext_cm.php'
);

Then you make a file in your extension called class.tx_myext_cm.php that 
has a class tx_myext_cm. This class needs a method "main".

In alt_clickmenu.php this will be called by

$menuItems = $obj->main($this,$menuItems,$table,$uid); from the 
processingByExtClassArray function.

So your class can add or remove things from the menuItems and return 
them at the end.

If you want your new clickmenu option to work like the Copy -> Paste 
then you only need a new option "Paste symlink" instead of  paste, after 
a copy operation. Obviously, if the user did a "cut" operation you can´t 
offer the symlink option...

greetings,

Christian Reiter


Kitsunet (Christian Müller) schrieb:
> Hi there,
> 
> maybe something like this was already done, but I would like to add to
> the BE filelist a function additionally to cut and copy that creates a
> symlink . I think this can't be so difficult, but for now I have no good
> starting point how to create a new entry in the filelist context menu
> or, after the user clicked on copy, get the copied file and create a
> symlink in the selected directory.
> 
> thanks for any hints or tips
> 
> Christian




More information about the TYPO3-dev mailing list