id)) { return Kohana::show_404(); } // @todo: this needs to be data-driven $template = new Theme_View("page.html", "photo", "default"); $template->set_global('item', $item); $template->set_global('children', $item->children()); $template->set_global('children_count', $item->children_count()); $template->set_global('parents', $item->parents()); $template->content = new View("photo.html"); print $template; } /** * @see Rest_Controller::_form_add($parameters) */ public function _form_add($parent_id) { $parent = ORM::factory("item", $parent_id); print photo::get_add_form($parent)->render(); } }