Feature #19656
closedFeature request for adding hooks inside the List module
0%
Description
This is a request for two hooks that would allow adding functionalities to the Web>List module. The idea is to add icons next to the "CSV" and "Export" icons (view screenshot) to create custom export options.
I have managed to add a "Export to Excel format" option by using two hooks in typo3/class.db_list_extra.inc and adding a new marker in typo3/templates/db_list.html.
This hook was put at the end of the localRecordList::getButtons() function, just before the return (line 255). $TYPO3_CONF_VARS also has to be added in the list of retrieved global variables at the beginning of the function.
Processing of the new buttons will be needed in order to merge them all inside one marker for output.
if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getButtons'])) {
foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getButtons'] as $classData) {
$hookObject = &t3lib_div::getUserObj($classData);
$buttons = $hookObject->getCustomButtons($buttons, $this);
}
}
This one goes at the end of localRecordList::getTable(), also just before the return. (line 560)
if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['customOutput'])) {
foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['customOutput'] as $classData) {
$hookObject = &t3lib_div::getUserObj($classData);
$buttons = $hookObject->customOutput($accRows, $this);
}
}
(issue imported from #M9856)
Files