public function csvAction() { //find if xml.phtml exists for this control $name = $this->getRequest()->getControllerName(); $path = $this->view->getScriptPath("") . $name . "/xml.phtml"; if (file_exists($path)) { //if so, then we support xml parent::csvAction(); } else { $this->setpagetitle($this->default_title()); $this->render("nocsv", null, true); } }