Forums / Developer / Debug disabled only on a certain modules view / Comment59191
André R.
Wednesday 19 May 2010 5:14:56 am
This is how ezjscore handles it (and ezoe for it's ajax views as well, but without using view parameter to conditionally enable it):
$debugOutput = isset($Params['debug']) ? $Params['debug'] : false; if ( $debugOutput && ( $contentType === 'xml' || $contentType === 'xhtml' ) ) { echo "<!--\r\n"; eZDebug::printReport( false, false ); echo "\r\n-->"; } else if ( $debugOutput && $contentType === 'json' ) { echo "/*\r\n"; eZDebug::printReport( false, false ); echo "\r\n*/"; } eZDB::checkTransactionCounter(); eZExecution::cleanExit();
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom