/**
  * 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']['newsreader'][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();
     }
     global $objPage;
     if ($this->news_template_modal) {
         $this->strTemplate = 'mod_news_modal';
         $this->news_template = $this->news_template_modal;
         // list config
         $this->news_showInModal = true;
         $this->news_readerModule = $this->id;
         // set modal css ID for generateModal() and parent::generate()
         $arrCss = deserialize($this->cssID, true);
         $arrCss[0] = NewsPlusHelper::getCSSModalID($this->id);
         $this->cssID = $arrCss;
         $this->base = \Controller::generateFrontendUrl($objPage->row());
         if ($this->Environment->isAjaxRequest && !$this->isSearchIndexer()) {
             $this->strTemplate = 'mod_news_modal_ajax';
             $this->generateAjax();
         }
         if (!$this->checkConditions()) {
             return $this->generateModal();
         }
     }
     return parent::generate();
 }
 protected static function getNewsDetails($objNews, $strUrl, $modalId)
 {
     $arrNews['modal'] = true;
     $arrNews['modalTarget'] = '#' . NewsPlusHelper::getCSSModalID($modalId);
     $arrNews['title'] = specialchars($objNews->headline, true);
     //$session = \Session::getInstance()->getData();
     //if($session[NEWSPLUS_SESSION_URL_PARAM]) $strUrlParam = '&'.$session[NEWSPLUS_SESSION_URL_PARAM];
     $arrNews['href'] = ampersand(sprintf($strUrl, !\Config::get('disableAlias') && $objNews->alias != '' ? $objNews->alias : $objNews->id)) . $strUrlParam;
     $arrEvent['link'] = $objNews->title;
     $arrEvent['target'] = '';
     return $arrNews;
 }