function appendDebugNodes(&$root, &$resourceData) { $path = $resourceData['template-filename']; // Do not ouput debug on pagelayout templates to avoid trigering // browser quirks mode if (isset($root[1][0][2]) && is_string($root[1][0][2]) && stripos($root[1][0][2], '<!DOCTYPE') === 0) { return; } $uri = $resourceData['uri']; $preText = "\n<!-- START: including template: {$path} ({$uri}) -->\n"; if (eZTemplate::isXHTMLCodeIncluded()) { $preText .= "<p class=\"small\">{$path}</p><br/>\n"; } $postText = "\n<!-- STOP: including template: {$path} ({$uri}) -->\n"; $preNode = eZTemplateNodeTool::createTextNode($preText); $postNode = eZTemplateNodeTool::createTextNode($postText); if (is_array($root[1])) { $root[1] = array_merge(array($preNode), $root[1]); } else { $root[1] = array($preNode); } $root[1][] = $postNode; }
function appendDebugNodes(&$root, &$resourceData) { $path = $resourceData['template-filename']; $uri = $resourceData['uri']; $preText = "\n<!-- START: including template: {$path} ({$uri}) -->\n"; if (eZTemplate::isXHTMLCodeIncluded()) { $preText .= "<p class=\"small\">{$path}</p><br/>\n"; } $postText = "\n<!-- STOP: including template: {$path} ({$uri}) -->\n"; $root[1] = array_merge(array(eZTemplateNodeTool::createTextNode($preText)), $root[1]); $root[1][] = eZTemplateNodeTool::createTextNode($postText); }