public function index($id) { if (isset($id)) { $article = Articles::getObjById($id); $this->template("header", ["title" => $article->getTitle(), "subtitle" => App::NAME . " / " . ArticleCategory::getObj($article->getCategory())->getName(), "categories" => ArticleCategory::getObjsAll()]); // $this->template("hero", ["title" => "News"]); $this->view("article/index", ["article" => $article]); $this->template("footer"); } else { header("Location: /"); } }