public function actionPageTitle($title) { $this->data->item = Page::findByTitle($title); if (empty($this->data->item)) { throw new E404Exception(' не найдено'); } }
/** * PHOTO */ public function actionPhoto($id) { $this->data->photos = Photo::findAllBy__page_id($id); $this->data->items = Page::findByPK($id); }