where("id", $id)->find(); if (empty($item->id)) { return Kohana::show_404(); } $this->template->set_global('item', $item); $this->template->set_global('children', $item->children()); $this->template->set_global('parents', $item->parents()); /** @todo: this needs to be data-driven */ $this->template->set_global('theme', new Theme("default", $this->template)); } }