/** * Generate the module */ protected function compile() { parent::compile(); // HOOK: add custom logic if (isset($GLOBALS['TL_HOOKS']['compileSlickNewsList']) && is_array($GLOBALS['TL_HOOKS']['compileSlickNewsList'])) { foreach ($GLOBALS['TL_HOOKS']['compileSlickNewsList'] as $callback) { $this->import($callback[0]); $this->{$callback}[0]->{$callback}[1]($this->Template, $this, $this->objModel); } } }
public function generate() { if (TL_MODE == 'BE') { $objTemplate = new \BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['newsfilter'][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(); } return parent::generate(); }
/** * Generate module */ protected function compile() { $this->Session->set('news_showtags', $this->news_showtags); $this->Session->set('news_jumpto', $this->tag_jumpTo); $this->Session->set('news_tag_named_class', $this->tag_named_class); if (strlen(\Input::get('tag')) && !$this->tag_ignore || strlen($this->tag_filter)) { $tagids = array(); $relatedlist = strlen(\Input::get('related')) ? preg_split("/,/", \Input::get('related')) : array(); $alltags = array_merge(array(\Input::get('tag')), $relatedlist); $first = true; if (strlen($this->tag_filter)) { $headlinetags = preg_split("/,/", $this->tag_filter); $tagids = $this->getFilterTags(); $first = false; } else { $headlinetags = array(); } foreach ($alltags as $tag) { if (strlen(trim($tag))) { if (count($tagids)) { $tagids = $this->Database->prepare("SELECT tid FROM tl_tag WHERE from_table = ? AND tag = ? AND tid IN (" . join($tagids, ",") . ")")->execute('tl_news', $tag)->fetchEach('tid'); } else { if ($first) { $tagids = $this->Database->prepare("SELECT tid FROM tl_tag WHERE from_table = ? AND tag = ?")->execute('tl_news', $tag)->fetchEach('tid'); $first = false; } } } } if (count($tagids)) { $this->compileFromParent($tagids); } else { parent::compile(); } } else { parent::compile(); } $this->Session->set('news_showtags', ''); $this->Session->set('news_jumpto', ''); $this->Session->set('news_tag_named_class', ''); }
/** * Generate the module */ protected function compile() { parent::compile(); }