Index: typo3/sysext/taskcenter/task/index.php =================================================================== --- typo3/sysext/taskcenter/task/index.php (revision 8864) +++ typo3/sysext/taskcenter/task/index.php (revision ) @@ -124,10 +124,12 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title')); - $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content .= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $GLOBALS['LANG']->getLL('title'), + $this->content + ); } /** Index: typo3/sysext/em/classes/index.php =================================================================== --- typo3/sysext/em/classes/index.php (revision 9361) +++ typo3/sysext/em/classes/index.php (revision ) @@ -575,10 +571,12 @@ ); // Build the for the module - $this->content = $this->doc->startPage('Extension Manager'); - $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content .= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + 'Extension Manager', + $this->content + ); } /** Index: typo3/sysext/list/mod1/db_list.php =================================================================== --- typo3/sysext/list/mod1/db_list.php (revision 9235) +++ typo3/sysext/list/mod1/db_list.php (revision ) @@ -209,21 +209,21 @@ // Apply predefined values for hidden checkboxes // Set predefined value for DisplayBigControlPanel: if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'activated') { - $this->MOD_SETTINGS['bigControlPanel'] = TRUE; + $this->MOD_SETTINGS['bigControlPanel'] = TRUE; } elseif ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'deactivated') { $this->MOD_SETTINGS['bigControlPanel'] = FALSE; } // Set predefined value for Clipboard: if ($this->modTSconfig['properties']['enableClipBoard'] === 'activated') { - $this->MOD_SETTINGS['clipBoard'] = TRUE; + $this->MOD_SETTINGS['clipBoard'] = TRUE; } elseif ($this->modTSconfig['properties']['enableClipBoard'] === 'deactivated') { $this->MOD_SETTINGS['clipBoard'] = FALSE; } // Set predefined value for LocalizationView: if ($this->modTSconfig['properties']['enableLocalizationView'] === 'activated') { - $this->MOD_SETTINGS['localization'] = TRUE; + $this->MOD_SETTINGS['localization'] = TRUE; } elseif ($this->modTSconfig['properties']['enableLocalizationView'] === 'deactivated') { $this->MOD_SETTINGS['localization'] = FALSE; } @@ -481,10 +481,12 @@ ); // Build the for the module - $this->content = $this->doc->startPage('DB list'); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + 'DB list', + $this->content + ); } /** Index: typo3/sysext/belog/mod/index.php =================================================================== --- typo3/sysext/belog/mod/index.php (revision 8742) +++ typo3/sysext/belog/mod/index.php (revision ) @@ -464,10 +464,13 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('adminLog')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $GLOBALS['LANG']->getLL('adminLog'), + $this->content + ); + } /** Index: typo3/sysext/perm/mod1/index.php =================================================================== --- typo3/sysext/perm/mod1/index.php (revision 8742) +++ typo3/sysext/perm/mod1/index.php (revision ) @@ -311,14 +311,16 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('permissions')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); } else { // If no access or if ID == zero - $this->content.=$this->doc->startPage($LANG->getLL('permissions')); - $this->content.=$this->doc->header($LANG->getLL('permissions')); + $this->content =$this->doc->header($LANG->getLL('permissions')); } - $this->content.= $this->doc->endPage(); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('permissions'), + $this->content + ); } /** Index: typo3/sysext/scheduler/mod1/index.php =================================================================== --- typo3/sysext/scheduler/mod1/index.php (revision 9104) +++ typo3/sysext/scheduler/mod1/index.php (revision ) @@ -157,16 +157,18 @@ } // Place content inside template - $content = $this->doc->startPage($GLOBALS['LANG']->getLL('title')); - $content .= $this->doc->moduleBody( + + $content = $this->doc->moduleBody( array(), $this->getDocHeaderButtons(), $this->getTemplateMarkers() ); - $content .= $this->doc->endPage(); - // Replace content with templated content - $this->content = $content; + // Renders the module page + $this->content = $this->doc->render( + $GLOBALS['LANG']->getLL('title'), + $content + ); } /** Index: typo3/sysext/beuser/mod/index.php =================================================================== --- typo3/sysext/beuser/mod/index.php (revision 8742) +++ typo3/sysext/beuser/mod/index.php (revision ) @@ -1184,10 +1184,12 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage('Backend User Administration'); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + 'Backend User Administration', + $this->content + ); } /** Index: typo3/sysext/recycler/mod1/index.php =================================================================== --- typo3/sysext/recycler/mod1/index.php (revision 8606) +++ typo3/sysext/recycler/mod1/index.php (revision ) @@ -112,13 +112,16 @@ * @return void */ public function flush() { - $content = $this->doc->startPage($GLOBALS['LANG']->getLL('title')); - $content.= $this->doc->moduleBody( + $content = $this->doc->moduleBody( $this->pageRecord, $this->getDocHeaderButtons(), $this->getTemplateMarkers() ); - $content.= $this->doc->endPage(); + // Renders the module page + $content = $this->doc->render( + $GLOBALS['LANG']->getLL('title'), + $content + ); $this->content = null; $this->doc = null; Index: typo3/sysext/about/mod/index.php =================================================================== --- typo3/sysext/about/mod/index.php (revision 8742) +++ typo3/sysext/about/mod/index.php (revision ) @@ -98,7 +98,6 @@ // ************************** #$TBE_TEMPLATE->bgColor = '#cccccc'; $TBE_TEMPLATE->backPath = $GLOBALS['BACK_PATH']; - $this->content.= $TBE_TEMPLATE->startPage('About'); $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.htmlspecialchars(TYPO3_version).', Copyright © '.htmlspecialchars(TYPO3_copyright_year), 'Kasper Skårhøj'); @@ -127,8 +126,12 @@ '; - $this->content.= $content; - $this->content.= $TBE_TEMPLATE->endPage(); + + // Renders the module page + $this->content = $TBE_TEMPLATE->render( + 'About', + $content + ); } /** Index: typo3/sysext/filelist/mod1/file_list.php =================================================================== --- typo3/sysext/filelist/mod1/file_list.php (revision 9235) +++ typo3/sysext/filelist/mod1/file_list.php (revision ) @@ -241,21 +241,21 @@ // Apply predefined values for hidden checkboxes // Set predefined value for DisplayBigControlPanel: if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'activated') { - $this->MOD_SETTINGS['bigControlPanel'] = TRUE; + $this->MOD_SETTINGS['bigControlPanel'] = TRUE; } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'deactivated') { $this->MOD_SETTINGS['bigControlPanel'] = FALSE; } // Set predefined value for DisplayThumbnails: if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'activated') { - $this->MOD_SETTINGS['displayThumbs'] = TRUE; + $this->MOD_SETTINGS['displayThumbs'] = TRUE; } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'deactivated') { $this->MOD_SETTINGS['displayThumbs'] = FALSE; } // Set predefined value for Clipboard: if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'activated') { - $this->MOD_SETTINGS['clipBoard'] = TRUE; + $this->MOD_SETTINGS['clipBoard'] = TRUE; } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'deactivated') { $this->MOD_SETTINGS['clipBoard'] = FALSE; } @@ -339,7 +339,6 @@ $docHeaderButtons = array_merge($this->getButtons(), $buttons); // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('files')); // Create output $pageContent=''; @@ -412,16 +411,19 @@ 'CONTENT' => $pageContent ); - $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers)); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers)); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('files'), + $this->content + ); } else { // Create output - no access (no warning though) - $this->content = ''; - $this->content .= $this->doc->startPage($LANG->getLL('files')); - $this->content .= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->render( + $LANG->getLL('files'), + '' + ); } Index: typo3/sysext/tsconfig_help/mod1/index.php =================================================================== --- typo3/sysext/tsconfig_help/mod1/index.php (revision 8209) +++ typo3/sysext/tsconfig_help/mod1/index.php (revision ) @@ -133,10 +133,12 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('title')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('title'), + $this->content + ); } /** Index: typo3/sysext/reports/mod/index.php =================================================================== --- typo3/sysext/reports/mod/index.php (revision 9360) +++ typo3/sysext/reports/mod/index.php (revision ) @@ -162,10 +162,12 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $GLOBALS['LANG']->getLL('title'), + $this->content + ); } /** Index: typo3/template.php =================================================================== --- typo3/template.php (revision 9277) +++ typo3/template.php (revision ) @@ -903,6 +903,21 @@ } /** + * Shortcut for render the complete page of a module + * + * @param $title page title + * @param $content page content + * @param bool $includeCsh flag for including csh code + * @return string complete page + */ + public function render($title, $content, $includeCsh = TRUE) { + $pageContent = $this->startPage($title, $includeCsh); + $pageContent .= $content; + $pageContent .= $this->endPage(); + return $this->insertStylesAndJS($pageContent); + } + + /** * Returns the header-bar in the top of most backend modules * Closes section if open. * Index: typo3/sysext/setup/mod/index.php =================================================================== --- typo3/sysext/setup/mod/index.php (revision 9339) +++ typo3/sysext/setup/mod/index.php (revision ) @@ -450,6 +450,8 @@ t3lib_FlashMessage::INFO ); $this->content .= $flashMessage->render(); + // end of wrapper div + $this->content .= ''; // Setting up the buttons and markers for docheader $docHeaderButtons = $this->getButtons(); @@ -457,12 +459,12 @@ $markers['CONTENT'] = $this->content; // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('UserSettings')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - // end of wrapper div - $this->content .= ''; - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('UserSettings'), + $this->content + ); } Index: typo3/sysext/tstemplate/ts/index.php =================================================================== --- typo3/sysext/tstemplate/ts/index.php (revision 9008) +++ typo3/sysext/tstemplate/ts/index.php (revision ) @@ -218,10 +218,12 @@ } // Build the for the module - $this->content = $this->doc->startPage('Template Tools'); - $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content .= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + 'Template Tools', + $this->content + ); } function printContent() { Index: typo3/sysext/info/mod1/index.php =================================================================== --- typo3/sysext/info/mod1/index.php (revision 8742) +++ typo3/sysext/info/mod1/index.php (revision ) @@ -145,22 +145,21 @@ ); // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('title')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); } else { // If no access or if ID == zero $this->doc = t3lib_div::makeInstance('mediumDoc'); $this->doc->backPath = $BACK_PATH; - $this->content.=$this->doc->startPage($LANG->getLL('title')); - $this->content.=$this->doc->header($LANG->getLL('title')); + $this->content = $this->doc->header($LANG->getLL('title')); - $this->content.=$this->doc->spacer(5); + $this->content .= $this->doc->spacer(5); - $this->content.=$this->doc->spacer(10); + $this->content .= $this->doc->spacer(10); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); } + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('title'), + $this->content + ); } /** Index: typo3/sysext/func/mod1/index.php =================================================================== --- typo3/sysext/func/mod1/index.php (revision 8742) +++ typo3/sysext/func/mod1/index.php (revision ) @@ -157,10 +157,12 @@ $markers['CONTENT'] = $this->content; } // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('title')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('title'), + $this->content + ); } /** Index: typo3/sysext/lowlevel/dbint/index.php =================================================================== --- typo3/sysext/lowlevel/dbint/index.php (revision 9058) +++ typo3/sysext/lowlevel/dbint/index.php (revision ) @@ -268,10 +268,12 @@ ); // Build the for the module - $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title')); - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + $GLOBALS['LANG']->getLL('title'), + $this->content + ); } /** Index: typo3/alt_intro.php =================================================================== --- typo3/alt_intro.php (revision 8742) +++ typo3/alt_intro.php (revision ) @@ -106,9 +106,8 @@ $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions'); $TBE_TEMPLATE->divClass = $TBE_TEMPLATE->bodyTagId; - $this->content.= $TBE_TEMPLATE->startPage('About modules'); - $this->content .= ' + $this->content = '

TYPO3 '.TYPO3_version.'
'.$LANG->getLL('introtext').'

@@ -129,8 +128,11 @@ $this->content.='

('.$LANG->getLL('endText').')

'; $this->content .= '
'; - // End page - $this->content.= $TBE_TEMPLATE->endPage(); + // Renders the module page + $this->content = $TBE_TEMPLATE->render( + 'About modules', + $this->content + ); } /** Index: typo3/sysext/cms/layout/db_layout.php =================================================================== --- typo3/sysext/cms/layout/db_layout.php (revision 9131) +++ typo3/sysext/cms/layout/db_layout.php (revision ) @@ -571,10 +571,12 @@ ); // Build the for the module - $this->content = $this->doc->startPage($LANG->getLL('title')); $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('title'), + $this->content + ); } else { @@ -623,10 +625,12 @@ 'CONTENT' => $body ); - $this->content=$this->doc->startPage($LANG->getLL('title')); $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.=$this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + // Renders the module page + $this->content = $this->doc->render( + $LANG->getLL('title'), + $this->content + ); } } Index: typo3/backend.php =================================================================== --- typo3/backend.php (revision 9341) +++ typo3/backend.php (revision ) @@ -263,9 +265,12 @@ ); // start page header: - $this->content .= $GLOBALS['TBE_TEMPLATE']->startPage($title); - $this->content .= $backendScaffolding; - $this->content .= $GLOBALS['TBE_TEMPLATE']->endPage(); + $this->content = $backendScaffolding; + // Renders the module page + $this->content = $GLOBALS['TBE_TEMPLATE']->render( + $title, + $this->content + ); $hookConfiguration = array('content' => &$this->content); $this->executeHook('renderPostProcess', $hookConfiguration); Index: typo3/sysext/lowlevel/config/index.php =================================================================== --- typo3/sysext/lowlevel/config/index.php (revision 9294) +++ typo3/sysext/lowlevel/config/index.php (revision ) @@ -326,11 +326,12 @@ ); // Build the for the module - $this->content = $this->doc->startPage('Configuration'); - - $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); - $this->content.= $this->doc->endPage(); - $this->content = $this->doc->insertStylesAndJS($this->content); + $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + // Renders the module page + $this->content = $this->doc->render( + 'Configuration', + $this->content + ); } /**