Project

General

Profile

Actions

Feature #19656

closed

Feature request for adding hooks inside the List module

Added by Philippe Moreau almost 16 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2008-11-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

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

listmodulewithaddedxlsexport.jpg (13.1 KB) listmodulewithaddedxlsexport.jpg Administrator Admin, 2008-11-28 18:00

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #23044: Feature request for adding hooks inside the List moduleClosed2010-06-29

Actions
Actions

Also available in: Atom PDF