diff options
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r-- | modules/tag/controllers/tags.php | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index 6011179a..db5f93bd 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -20,31 +20,40 @@ class Tags_Controller extends REST_Controller { protected $resource_type = "tag"; - /** - * @see Rest_Controller::_index() - */ + public function _show($tag) { + // @todo: these need to be pulled from the database + $theme_name = "default"; + $page_size = 9; + + $template = new View("page.html"); + + $page = $this->input->get("page", "1"); + $theme = new Theme($theme_name, $template); + + $template->set_global("page_type", "tag"); + $template->set_global('page_size', $page_size); + $template->set_global('tag', $tag); + $template->set_global('children', $tag->items($page_size, ($page-1) * $page_size)); + $template->set_global('children_count', $tag->count); + $template->set_global('theme', $theme); + $template->set_global('user', Session::instance()->get('user', null)); + $template->content = new View("tag.html"); + + print $template; + } + public function _index() { throw new Exception("@todo Tag_Controller::_index NOT IMPLEMENTED"); } - /** - * @see Rest_Controller::_form_add($parameters) - */ public function _form_add($parameters) { throw new Exception("@todo Tag_Controller::_form NOT IMPLEMENTED"); } - /** - * @see Rest_Controller::_form_edit($resource) - */ public function _form_edit($tag) { throw new Exception("@todo Tag_Controller::_form NOT IMPLEMENTED"); } - public function _show($tag) { - Albums_Controller::_show($tag); - } - public function _create($tag) { throw new Exception("@todo Tag_Controller::_create NOT IMPLEMENTED"); } |