public function getItem($r) { $t = new Dase_Template($r); //if no format, assume name is ID $item = new Dase_DBO_Item($this->db); if ($item->load($r->get('name'))) { $item->getSets(); $t->assign('item', $item); $sets = Dase_DBO_Itemset::getList($this->db); $t->assign('sets', $sets); $r->renderResponse($t->fetch('framework/item.tpl')); } else { $r->renderRedirect('items'); //$r->renderError(404); } }