Ejemplo n.º 1
0
 public function view()
 {
     $newsflow = new Newsflow();
     // get the latest data as well
     $slots = $newsflow->getSlotContents();
     $this->set('slot', $slots[$this->slot]);
     // this is kind of a hack
     /*
     if ($this->slot == 'C') {
         $ni = false;
         try {
             // in case we are not connected $ni will throw an exception ...
             $ni = $newsflow->getEditionByPath('/newsflow');
         } catch (\Exception $e) {
         }
         if ($ni !== false) {
             $this->set('editionTitle', $ni->getTitle());
             $this->set('editionDescription', $ni->getDescription());
             $this->set('editionDate', $ni->getDate());
             $this->set('editionID', $ni->getID());
         } else {
         }
     }
     */
 }
Ejemplo n.º 2
0
 public function view()
 {
     $newsflow = new Newsflow();
     // get the latest data as well
     $slots = $newsflow->getSlotContents();
     $this->set('slot', $slots[$this->slot]);
     // this is kind of a hack
     if ($this->slot == 'C') {
         $ni = $newsflow->getEditionByPath('/newsflow');
         if ($ni !== false) {
             $this->set('editionTitle', $ni->getTitle());
             $this->set('editionDescription', $ni->getDescription());
             $this->set('editionDate', $ni->getDate());
             $this->set('editionID', $ni->getID());
         } else {
         }
     }
 }