getCurrentGallery(); return $model->getAlbums(); } public function getAlbums($album_id=0) { $model = $this->getCurrentGallery(); if($album_id) return $model->getAlbums($album_id); else return $model->getAlbums($model->getGalleryId()); } public function getBreadbcrumbTree() { $model = $this->getCurrentGallery(); return $model->getBreadbcrumbTree($model); } public function getGalleryDescription() { $model = $this->getCurrentGallery(); if($model->getDescription()) return $model->getDescription(); else return ""; } public function getGalleryTitle() { $model = $this->getCurrentGallery(); if($model->getTitle()) return $model->getTitle(); else return "Gallery"; } public function getCurrentGallery() { if(!Mage::registry('current_gallery')) Mage::register('current_gallery', Mage::getModel('gallery/toitgallery')); return Mage::registry('current_gallery'); } public function getGalleryUrl($model) { if($model->getType() == 'album') return $this->getUrl('gallery/index/view/').'id/'.$model->getGalleryId(); else return $this->getUrl('gallery/index/photo/').'id/'.$model->getGalleryId(); //return str_replace("\\","/",$model->getThumbnailUrl(300,300)); } public function getFancyClass($model) { if($model->getType() == 'album') return ' album '; else return 'gallery_fancybox'; } }