[TYPO3-english] Re: [TYPO3] How to disable search in upper right corner of the BE

Christopher Christopher at temporaryforwarding.com
Sun Oct 19 15:26:53 CEST 2008


> Hi guys,
>
> for a small website I do not need the search in the upper right corner.
> Therefore I want to hide it.
>
> How can I do that?

Hi guys,

with the following solution (based on TYPO3 4.2.2) the search is only shown, 
if the list-module is activated for the current user (which was helpful for 
me):
In typo3/classes/class.backendsearchmenu go to render() (line 71) and 
directly under public function render() { add  the following:
global $BE_USER;
// In most cases the search-results are displayed in the list-module.
// Only render the search-item, if the user has access to the list-module.
if($BE_USER->check('modules','web_list')) {
... [here comes the whole function render()] ...
}
Then in the public function getAdditionalAttributes() (line 104) add the 
same:
public function getAdditionalAttributes() {
global $BE_USER;
// Only render the search, if user has access to the list-module.
if($BE_USER->check('modules','web_list')) {
     return ' id="backend-search-menu"';
}
}

Christopher 




More information about the TYPO3-english mailing list