Method action_404() :
public function action_404(){
return Response::forge(ViewModel::forge('norms/404'), 404);
}
<?php
class View_Norms_404 extends ViewModel
{
public function view()
{
$messages = array('Norms1', 'Norms2', 'Norms3', 'Norms4', 'Norms5');
$this->title = $messages[array_rand($messages)];
}
}
if(!is_null($id)){
$this->template->content = View::forge('norms/views',$data);//Chemin d'accès
} else {
$this->action_404();
}
[b] ErrorException [ Notice ]: Undefined variable: content [/b]
if(!is_null($id)){
$this->template->content = View::forge('norms/views',$data);//Chemin d'accès
} else {
Response::redirect('norms/404');
}
It looks like you're new here. If you want to get involved, click one of these buttons!