/** * 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); // $destinationDb->getTest($poi_id, $this); // Data if ($this->_languageId == 1) { $destination = $destinationDb->getAllByIdLang($this->_destId, $this->_languageId, !isset($userInfo->id)); } else { $destination = $destinationDb->getAllByIdLangForIndo($this->_destId, $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); $this->view->author = $author[0]['name']; $this->view->headTitle()->prepend($this->_destTitle); $this->view->category = $category; $this->view->pageTitle = $this->_destTitle; $this->view->textdescIndo = $text; $this->view->image = $destination['image']; $this->view->sectionTitle = $this->view->translate('id_poi_description'); $this->view->sectionContent = $destination['description']; $this->view->langId = $this->_languageId; $this->view->culture = $destination; Zend_Registry::set('backlink', $this->view->currentUrl()); // Render //$this->render('destination'); } else { $this->_redirector->gotoUrl($this->view->baseUrl('/search/')); } array_unshift($this->_meta, $this->_destTitle, $category['name']); $this->view->headMeta()->appendName('keywords', join(', ', $this->_meta)); $this->view->headMeta()->appendName('description', $this->view->truncate($destination['description'], 250)); }