RFC #7429:Docheaders: Module Web > Page : No docheader when no page has been chosen
authorPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 13:48:37 +0000 (13:48 +0000)
committerPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 13:48:37 +0000 (13:48 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3179 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/cms/layout/db_layout.php

index 63978ee..f588d25 100755 (executable)
@@ -546,17 +546,47 @@ class SC_db_layout {
                } else {
 
                                // If no access or id value, create empty document:
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
+                       $this->doc = t3lib_div::makeInstance('template');
                        $this->doc->docType='xhtml_trans';
                        $this->doc->backPath = $BACK_PATH;
+                       $this->doc->setModuleTemplate('templates/db_layout.html');
                        
                        $this->doc->JScode = $this->doc->wrapScriptTags('
                                if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
                        ');
                        
+                       $body = $this->doc->section($LANG->getLL('clickAPage_header'), $LANG->getLL('clickAPage_content'), 0, 1);
+                       
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = array(
+                               'view' => '',
+                               'history_page' => '', 
+                               'new_content' => '', 
+                               'move_page' => '',
+                               'move_record' => '',
+                               'new_page' => '', 
+                               'edit_page' => '',
+                               'record_list' => '',
+                               'csh' => '',
+                               'shortcut' => '',
+                               'cache' => '',
+                               'savedok' => '',
+                               'savedokshow' => '',
+                               'closedok' => '',
+                               'deletedok' => '',
+                               'undo' => '',
+                               'history_record' => ''
+                       );
+                               
+                       $markers = array(
+                               'CSH' => t3lib_BEfunc::cshItem($this->descrTable, '', $BACK_PATH),
+                               'TOP_FUNCTION_MENU' => '',
+                               'LANGSELECTOR' => '',
+                               'CONTENT' => $body
+                       );      
+                       
                        $this->content=$this->doc->startPage($LANG->getLL('title'));
-                       $this->content.=$this->doc->section($LANG->getLL('clickAPage_header'),$LANG->getLL('clickAPage_content'),0,1);
-                       $this->content.= t3lib_BEfunc::cshItem($this->descrTable,'',$BACK_PATH,'<br/><br/>');
+                       $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
                        $this->content.=$this->doc->endPage();
                        $this->content = $this->doc->insertStylesAndJS($this->content);
                }