Created
November 29, 2011 12:40
-
-
Save danfrost/1404675 to your computer and use it in GitHub Desktop.
How to use TYPO3 hooks to customise what is displayed in a given listing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Make an empty extension | |
# 2. ext_tables.php | |
<?php | |
require_once t3lib_extMgm::extPath('dblist_hook') . '/class.user_tx_belisthook.php'; | |
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'][] = 'user_tx_belisthook'; | |
?> | |
# 3. class.user_tx_belisthook.php | |
<?php | |
class user_tx_belisthook implements t3lib_localRecordListGetTableHook | |
{ | |
public function getDBlistQuery($table, $pageId, &$additionalWhereClause, &$selectedFieldsList, &$parentObject) | |
{ | |
$additionalWhereClause .= ' and 0 '; # << whatever you like here | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment