public function actionSection() { $obj = new SectionDB(); if (!$obj->load($this->request->id)) { $this->notFound(); } $this->title = $obj->title; $this->meta_desc = $obj->meta_desc; $this->meta_key = $obj->meta_key; $head = $this->getHead(array("/css/main.css")); $head->js = array("/js/main.js"); $content = new Sectionproduct(); $hornav = $this->getHornav(); $hornav->addData($obj->title); $content->hornav = $hornav; $content->title = $obj->title; $content->full_text = $obj->full_text; $count = ProductDB::getCountProductOnSection($this->request->id); $offset = $this->getOffset(Config::COUNT_PRODUCTS_ON_PAGE); $url = URL::get("section", "", array("id" => $this->request->id)); $products = ProductDB::getProductOnSection($this->request->id, Config::COUNT_PRODUCTS_ON_PAGE, $offset); $categories = CategoryDB::getCategoryOnSection($this->request->id); $pagination = $this->getPagination($count, Config::COUNT_PRODUCTS_ON_PAGE, $url); $content->products = $products; $content->pagination = $pagination; $content->categories = $categories; $this->render($head, $content); }