From: eric.chavaillaz Date: Mon, 7 Oct 2013 15:54:00 +0000 (+0200) Subject: [FEATURE] Add hook to custom header in page mod X-Git-Tag: TYPO3_6-2-0beta1~119 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/ab11514a6823e0865334bac6661d806ed0ad2cd6 [FEATURE] Add hook to custom header in page mod Add an hook to allow modifying the header of a page in the page module. This hook is called before the content of the page is rendered. Resolves: #52579 Releases: 6.2 Change-Id: I8914f5617d1529e98b9bc2b27cdc5a4378b0a7da Reviewed-on: https://review.typo3.org/24460 Reviewed-by: Daniel Huf Reviewed-by: Xavier Perseguers Tested-by: Xavier Perseguers Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn --- diff --git a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php index bc5024463a3b..9ec4e2314a78 100644 --- a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php +++ b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php @@ -953,6 +953,16 @@ class PageLayoutController { // END: traverse tables // For Context Sensitive Menus: $this->doc->getContextMenuCode(); + // Init the content + $content = ''; + // Additional header content + $headerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawHeaderHook']; + if (is_array($headerContentHook)) { + foreach ($headerContentHook as $hook) { + $params = array(); + $content .= GeneralUtility::callUserFunction($hook, $params, $this); + } + } // Add the content for each table we have rendered (traversing $tableOutput variable) foreach ($tableOutput as $table => $output) { $content .= $this->doc->section('', $output, TRUE, TRUE, 0, TRUE);