Example #1
0
 public function index($id)
 {
     if (isset($id)) {
         $this->template("header", ["title" => ArticleCategory::getObj($id)->getName(), "subtitle" => App::NAME . " " . App::TAGLINE, "categories" => ArticleCategory::getObjsAll(), "currCategory" => $id]);
         // $this->template("hero", ["title" => "News"]);
         $this->view("front/index", ["articles" => Article::getObjsByCategory($id)]);
         $this->template("footer");
     } else {
         header("Location: /");
     }
 }