/**
  * Do the frontend integration generation.
  *
  * @return string
  */
 public function generate()
 {
     $this->mapProvider->handleAjaxRequest($this->getIdentifier());
     if (TL_MODE === 'BE') {
         $model = MapModel::findByPk($this->get('leaflet_map'));
         $template = $this->getTemplateFactory()->createBackendTemplate('be_wildcard');
         if ($model) {
             $href = 'contao/main.php?do=leaflet&table=tl_leaflet_map&act=edit&id=' . $model->id;
             $template->set('wildcard', '### LEAFLET MAP ' . $model->title . ' ###');
             $template->set('title', $this->get('headline'));
             $template->set('id', $model->id);
             $template->set('link', $model->title);
             $template->set('href', $href);
         }
         return $template->parse();
     }
     return parent::generate();
 }