/** * IS: - * FS: Mengirimkan ke viewer: pageTitle, sectionTitle, sectionContent * Desc: Fungsi untuk menampilkan halaman utama destinasi */ public function indexAction() { $this->_helper->layout->setLayout('kebudayaan'); // untuk menghitung page view $this->view->pageViewer = $this->countView(); // Params $poi_id = $this->_getParam('destId'); // Model $destinationDb = new Model_DbTable_Destination(); $table_videos = new Model_DbTable_CultureVideo(); $this->view->videos = $table_videos->findByCultureId($this->_destId); // Data if ($this->_languageId == 1) { $destination = $destinationDb->getAllByIdLang($this->_destId, $this->_languageId); } else { $destination = $destinationDb->getAllByIdLangForIndo($this->_destId, $this->_languageId); } $userInfo = new Zend_Session_Namespace('userInfo'); if (isset($userInfo->id)) { $destination = $destinationDb->getAllByIdLang($this->_destId, $this->_languageId, false); } $author = $destinationDb->getAuthor($poi_id, $this->_languageId); // Related poi $relatedPoiDb = new Model_DbTable_RelatedPoi(); $relatedPois = $relatedPoiDb->getAllRelatedByPoiIdLangId($this->_destId, $this->_languageId); $this->view->relatedPois = $relatedPois; $category = $destinationDb->getCategory($poi_id, $this->_languageId); // $related = $destinationDb->getRelatedCulture($poi_id,$this->_languageId); //if do not have a description, will be redirecting to list of destination if ($destination['description']) { $destination['description'] = $this->_replaceImageUrl($destination['description']); if (array_key_exists('text', $destination)) { $text = $destination['text']; } else { $text = ''; } // Breadcrumb $texthomelink = $this->view->translate('id_menu_home'); $links = array($texthomelink => $this->view->baseUrl('/'), $this->_destTitle => ''); Zend_Registry::set('breadcrumb', $links); if (!empty($this->author['name'])) { $this->view->author = $author['name']; } // $this->view->related = $related; $this->view->category = $category['name']; $this->view->pageTitle = $this->_destTitle; $this->view->textdescIndo = $text; $this->view->sectionTitle = $this->view->translate('id_poi_description'); $this->view->sectionContent = $destination['description']; Zend_Registry::set('backlink', $this->view->currentUrl()); // Render //$this->render('destination'); } else { $this->_redirector->gotoUrl($this->view->baseUrl('/destination/search/')); } }