Bug #18024 ยป topmenu_backend.diff
typo3/backend.php (working copy) | ||
---|---|---|
require_once('interfaces/interface.backend_toolbaritem.php');
|
||
require('classes/class.typo3logo.php');
|
||
require('classes/class.typo3topmenu.php');
|
||
require('classes/class.modulemenu.php');
|
||
// core toolbar items
|
||
... | ... | |
$logo = t3lib_div::makeInstance('TYPO3Logo');
|
||
$logo->setLogo('gfx/typo3logo_mini.png');
|
||
$topMenu = t3lib_div::makeInstance('TYPO3topMenu');
|
||
$menu = $this->moduleMenu->render();
|
||
... | ... | |
$backendScaffolding = '
|
||
<div id="typo3-backend">
|
||
<div id="typo3-top-container">
|
||
<div id="typo3-logo">'.$logo->render().'</div>
|
||
<div id="typo3-top" class="typo3-top-toolbar">'
|
||
<div id="typo3-logo">'.$logo->render().'</div>'
|
||
.$topMenu->topMenu().
|
||
'<div id="typo3-top" class="typo3-top-toolbar">'
|
||
.$this->renderToolbar()
|
||
.'</div>
|
||
</div>
|
typo3/classes/class.typo3topmenu.php (revision 0) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2008 Steffen Kamper <info@sk-typo3.de>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
|
||
|
||
/**
|
||
* class to render the TYPO3 topMenu in the backend
|
||
*
|
||
*
|
||
*
|
||
* @author Steffen Kamper <info@sk-typo3.de>
|
||
* @package TYPO3
|
||
* @subpackage core
|
||
*/
|
||
class TYPO3topMenu {
|
||
|
||
private $content;
|
||
|
||
/**
|
||
* constructor
|
||
*
|
||
* @return void
|
||
*/
|
||
public function __construct() {
|
||
$this->content = null;
|
||
}
|
||
|
||
/**
|
||
* Add topMenu from Hook
|
||
*
|
||
* @return string topMenu list
|
||
*/
|
||
|
||
public function topMenu() {
|
||
$contentArray = array();
|
||
|
||
// Hook for adding content to the topmenu.
|
||
if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_topmenu_dummy.php']['fetchContentTopmenu'])) {
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_topmenu_dummy.php']['fetchContentTopmenu'] as $classRef) {
|
||
$hookObj = &t3lib_div::getUserObj($classRef);
|
||
if (method_exists($hookObj,'fetchContentTopmenu_processContent')) {
|
||
$tempContent = $hookObj->fetchContentTopmenu_processContent($this);
|
||
|
||
// Placement priority handling.
|
||
if (is_int($hookObj->priority) and ($hookObj->priority>=1 and $hookObj->priority<=9)) {
|
||
$priority = $hookObj->priority;
|
||
} else $priority = 5;
|
||
|
||
$overrulestyle = isset($hookObj->overrulestyle) ? $hookObj->overrulestyle : '';
|
||
$contentArray[$priority][] = '<li class="top-menu" style="'.$overrulestyle.'">'.$tempContent.'</li>';
|
||
}
|
||
}
|
||
ksort($contentArray);
|
||
}
|
||
|
||
if(count($contentArray)>0) {
|
||
$this->content.='
|
||
<div id="typo3-topmenu">
|
||
<!--
|
||
Alternative module menu displayed in top div:
|
||
-->
|
||
<ul>';
|
||
|
||
foreach ($contentArray as $key=>$menucontent) {
|
||
$this->content .= implode(chr(10), $menucontent);
|
||
}
|
||
|
||
$this->content.='
|
||
</ul>
|
||
</div>';
|
||
}
|
||
|
||
return $this->content;
|
||
}
|
||
}
|
||
|
||
|
||
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.typo3topmenu.php']) {
|
||
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.typo3topmenu.php']);
|
||
}
|
||
|
||
?>
|
typo3/css/backend-scaffolding.css (working copy) | ||
---|---|---|
}
|
||
#typo3-topmenu {
|
||
float:left;
|
||
}
|
||
#typo3-topmenu ul {
|
||
list-style:none;
|
||
margin:4px;
|
||
}
|
||
#typo3-topmenu ul li{
|
||
}
|
||