name."_".$page[0].'.html') && $TeKe->plugin->is_test_constructor()) {
$this->setTemplate($this->name."_".$page[0]);
} else {
$this->setTemplate("page_not_found");
}
}
public function setNavigation() {
global $TeKe;
if (!$TeKe->plugin->is_test_constructor()) {
return "";
}
$this->navigation []= array('title'=>_('Tests'), 'url'=>"tests/view", 'current'=>$this->is_current_page($this->page[0], "view"));
//if ($TeKe->is_admin()) {
if ($TeKe->plugin->context) {
$actions = $TeKe->plugin->context->getActions();
foreach ($actions as $action => $item) {
$current_context = "add";
if (isset($this->page[2])) {
$current_context = $this->page[2];
}
$url = "tests/test/".$this->page[1]."/".$action;
if (!$TeKe->plugin->context->getId()) {
$url = "tests/test/".$action;
}
$this->navigation []= array(
'title'=>$item["title"],
'disabled'=>$item["disabled"],
'url'=>$url,
'current'=>$this->is_current_page($current_context, $action)
);
}
} else {
$this->navigation []= array('title'=>_('Add New'), 'url'=>"tests/test/add", 'current'=>$this->is_current_page($this->page[0], "add"));
}
//}
}
}
?>