find(); if (!$item->loaded) { return Kohana::show_404(); } $view = new View("feed.mrss"); $view->item = $item; // This should probably be a method in ORM_MPTT $view->children = ORM::factory("item") ->where("parent_id", $item->id) ->where("type", "photo") ->find_all(); header("Content-type: application/rss+xml"); print $view; } }