Files
2024-12-17 13:43:22 +01:00

55 lines
2.0 KiB
PHP

<?php
/**
* 2012 - 2020 HiPresta
*
* MODULE Gallery
*
* @author HiPresta <support@hipresta.com>
* @copyright HiPresta 2020
* @license Addons PrestaShop license limitation
* @link https://hipresta.com
*
* NOTICE OF LICENSE
*
* Don't use this module on several shops. The license provided by PrestaShop Addons
* for all its modules is valid only once for a single shop.
*/
class HiGalleryGalleryModuleFrontController extends ModuleFrontController
{
public $display_column_left = false;
public $display_column_right = false;
public function getBreadcrumbLinks()
{
$breadcrumb = parent::getBreadcrumbLinks();
$breadcrumb['links'][] = array(
'title' => $this->module->l('Gallery', 'gallery'),
'url' => $this->module->getGalleryFrontUrl(),
);
return $breadcrumb;
}
public function initContent()
{
parent::initContent();
$this->context->smarty->assign(array(
'psv' => $this->module->psv,
'meta_title' => $this->module->gallery_meta_title[$this->context->language->id],
'meta_description' => $this->module->gallery_meta_description[$this->context->language->id],
'meta_keywords' => $this->module->gallery_meta_keywords[$this->context->language->id],
'gallery_controller_name' => Dispatcher::getInstance()->getController(),
'upload_img_path' => __PS_BASE_URI__.'modules/'.$this->module->name.'/views/img/upload/',
'galleries' => GalleryItem::getAllGalleries('active', 'gallery_page'),
'gallery_title' => Configuration::get('HI_GALLERY_PAGE_TITLE', $this->context->language->id),
'gallery_description' => Configuration::get('HI_GALLERY_PAGE_DESCRIPTION', $this->context->language->id)
));
if ($this->module->psv >= 1.7) {
$this->setTemplate('module:'.$this->module->name.'/views/templates/front/galleries17.tpl');
} else {
$this->setTemplate('galleries.tpl');
}
}
}