View file Web Template Ktpl/package/system/controllers/ktpl/hooks/error_404.php
<?php
class onKtplError404 extends cmsAction {
public function run($data){
if($this->options['robots'] && $data == 'robots.txt'){
echo $this->options['robots'];
$this->halt();
}
if($this->options['error404']){
if(ob_get_length()) { ob_end_clean(); }
header("HTTP/1.0 404 Not Found");
header("HTTP/1.1 404 Not Found");
header("Status: 404 Not Found");
cmsTemplate::getInstance()->renderAsset('errors/skins/' . $this->options['error404'] . '/index');
die();
}
return $data;
}
}