/** * Display the template * * @param sting $tpl template * * @return void */ public function display($tpl = null) { if (parent::display($tpl) !== false) { if (!$this->app->isAdmin()) { $state = $this->get('State'); $this->params = $state->get('params'); if ($this->params->get('menu-meta_description')) { $this->doc->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->doc->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->doc->setMetadata('robots', $this->params->get('robots')); } } // Set the response to indicate a file download $this->app->setHeader('Content-Type', 'application/vnd.ms-word'); $name = $this->getModel()->getTable()->label; $name = JStringNormalise::toDashSeparated($name); $this->app->setHeader('Content-Disposition', "attachment;filename=\"" . $name . ".doc\""); $this->doc->setMimeEncoding('text/html; charset=Windows-1252', false); $this->output(); } }
/** * Display the template * * @param sting $tpl Template * * @return void */ public function display($tpl = null) { parent::display($tpl); $this->nav = ''; $this->showPDF = false; $this->showRSS = false; $this->filters = array(); $this->assign('showFilters', false); $this->assign('hasButtons', false); $this->output(); }
/** * Display the template * * @param sting $tpl template * * @return void */ public function display($tpl = null) { if (parent::display($tpl) !== false) { $app = JFactory::getApplication(); if (!$app->isAdmin()) { $this->state = $this->get('State'); $this->params = $this->state->get('params'); $this->document = JFactory::getDocument(); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } $this->output(); } }
/** * Display the template * * @param sting $tpl Template * * @return void */ public function display($tpl = null) { if (!JFolder::exists(COM_FABRIK_BASE . '/libraries/dompdf')) { throw new RuntimeException('Please install the dompdf library', 404); return; } if (parent::display($tpl) !== false) { $model = $this->getModel(); $params = $model->getParams(); $size = $params->get('pdf_size', 'A4'); $orientation = $params->get('pdf_orientation', 'portrait'); $this->doc->setPaper($size, $orientation); $this->nav = ''; $this->showPDF = false; $this->showRSS = false; $this->emptyLink = false; $this->filters = array(); $this->showFilters = false; $this->hasButtons = false; $this->output(); } }
/** * Display the template * * @param string $tpl Template * * @return void */ public function display($tpl = null) { if (parent::display($tpl) !== false) { /** @var FabrikFEModelList $model */ $model = $this->getModel(); $this->tabs = $model->loadTabs(); if (!$this->app->isAdmin() && isset($this->params)) { /** @var JObject $state */ $state = $model->getState(); $stateParams = $state->get('params'); if ($stateParams->get('menu-meta_description')) { $this->doc->setDescription($stateParams->get('menu-meta_description')); } if ($stateParams->get('menu-meta_keywords')) { $this->doc->setMetadata('keywords', $stateParams->get('menu-meta_keywords')); } if ($stateParams->get('robots')) { $this->doc->setMetadata('robots', $stateParams->get('robots')); } } $this->output(); } }