trigger ('plgVmOnSelfCallFE', array($type, $name, &$render)); if ($render) { // Get the document object. $document = vFactory::getDocument (); if (vRequest::getCmd ('cache') == 'no') { JResponse::setHeader ('Cache-Control', 'no-cache, must-revalidate'); JResponse::setHeader ('Expires', 'Mon, 6 Jul 2000 10:00:00 GMT'); } $format = vRequest::getCmd ('format', 'json'); if ($format == 'json') { $document->setMimeEncoding ('application/json'); // Change the suggested filename. JResponse::setHeader ('Content-Disposition', 'attachment;filename="' . $type . '.json"'); JResponse::setHeader("Content-type","application/json"); JResponse::sendHeaders(); echo json_encode ($render); jExit(); } else { echo $render; jExit(); } } else { } } }