/**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### News4ward READER ###';
         $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();
     }
     $this->news_archives = $this->sortOutProtected(deserialize($this->news4ward_archives));
     // Return if there are no archives
     if (!is_array($this->news_archives) || count($this->news_archives) < 1) {
         return '';
     }
     // Read the alias from the url
     if (!preg_match("~.*" . preg_quote($GLOBALS['objPage']->alias) . "/([a-z0-9\\._-]+).*~i", $this->Environment->request, $erg)) {
         return '';
     }
     // strip suffix
     if (substr($erg[1], -strlen($GLOBALS['TL_CONFIG']['urlSuffix'])) == $GLOBALS['TL_CONFIG']['urlSuffix']) {
         $erg[1] = substr($erg[1], 0, -strlen($GLOBALS['TL_CONFIG']['urlSuffix']));
     }
     $this->alias = $erg[1];
     // set the template
     if (strlen($this->news4ward_readerTemplate)) {
         $this->strTemplate = $this->news4ward_readerTemplate;
     }
     return parent::generate();
 }
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### News4ward LIST ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     $this->news_archives = $this->sortOutProtected(deserialize($this->news4ward_archives));
     // Return if there are no archives
     if (!is_array($this->news_archives) || count($this->news_archives) < 1) {
         return '';
     }
     return parent::generate();
 }