public function actionBrand() { $obj = new BrandDB(); 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 Brandproduct(); $hornav = $this->getHornav(); $hornav->addData($obj->title); $content->hornav = $hornav; $content->title = $obj->title; $count = ProductDB::getCountProductOnBrand($this->request->id); $offset = $this->getOffset(Config::COUNT_PRODUCTS_ON_PAGE); $url = URL::get("brand", "", array("id" => $this->request->id)); $products = ProductDB::getProductOnBrand($this->request->id, Config::COUNT_PRODUCTS_ON_PAGE, $offset); $pagination = $this->getPagination($count, Config::COUNT_PRODUCTS_ON_PAGE, $url); $content->products = $products; $content->pagination = $pagination; $this->render($head, $content); }