Пример #1
0
 /**
  * Parse the template
  * @return string
  */
 public function generate()
 {
     // set the item from the auto_item parameter
     if ($GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
         \Input::setGet('items', \Input::get('auto_item'));
     }
     return parent::generate();
 }
 /**
  * Set the template
  * @return string
  */
 public function generate()
 {
     // set the item from the auto_item parameter
     if ($GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
         \Input::setGet('items', \Input::get('auto_item'));
     }
     if (\Input::get('items')) {
         // get the content element id from the $_GET - variable if multiple gallery_creator content elements are embeded on the current page
         $this->ContentElementId = $this->countGcContentElementsOnPage() > 1 ? \Input::get('ce') : $this->id;
         // only display the detail view of the selected album if multiple gallery_creator content elements are embeded on the current page
         if ($this->id != $this->ContentElementId && $this->countGcContentElementsOnPage() > 1) {
             return '';
         }
     }
     return parent::generate();
 }