/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new \BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['sermonreader'][0]) . ' ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } // Set the item from the auto_item parameter if (!isset($_GET['items']) && $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) { \Input::setGet('items', \Input::get('auto_item')); } // Do not index or cache the page if no news item has been specified if (!\Input::get('items')) { global $objPage; $objPage->noSearch = 1; $objPage->cache = 0; return ''; } $this->serm_sermonarchive = $this->sortOutProtected(deserialize($this->serm_sermonarchive)); // Do not index or cache the page if there are no archives if (!is_array($this->serm_sermonarchive) || empty($this->serm_sermonarchive)) { global $objPage; $objPage->noSearch = 1; $objPage->cache = 0; return ''; } return parent::generate(); }
public function generateAjax() { $this->strTemplate = $this->strTemplate . '_ajax'; return parent::generate(); }