

On some typoscript properties there is no stdWrap, although it would be handy from time to time.
This snippet adds a stdWrap or some other php function to a property and calls the original TYPO3 function.
The following example adds a stdWrapto the HMENU propertie begin.
Typoscript:
includeLibs.userFunc= fileadmin/menuBegin.php lib.menu=USER_INT lib.menu.userFunc = user_menuBegin->stdWrapBegin lib.menu.userFunc.begin.data= GPvar:beginMenu lib.menu.userFunc.1=TMENU lib.menu.userFunc.1.NO.allWrap=|*|| |*| | lib.menu.userFunc.1.NO.ATagParams=class="menu" lib.menu.userFunc.1.noBlur=1
File fileadmin/menuBegin.php :
<?
class user_menuBegin{
function stdWrapBegin($content,$conf) {
$conf['begin']=$this->cObj->stdWrap($conf['begin'],$conf['begin.']);
return $this->cObj->HMENU($conf);
}
}
?>




Add comment