<?php
$loader = $this->registry->get('load');
$loader->controller('product/productList');

class ControllerModuleSpecialAction extends ControllerProductProductList {

	public function index($setting=null) {
		$this->language->load('module/special_action');

		$this->data['productListTitle'] = array();

		$this->data['heading_title']  		 = ($this->config->get('special_action_title')) ? $this->config->get('special_action_title') :$this->language->get('heading_title');
		$this->data['moduleSpecialAction'] = $this->getChild('product/productList/moduleSpecialAction', $setting);
		$this->data['exibeModule']    		 = parent::getExibeModulo();
		$this->data['positionModulo']   	 = parent::getPositionModulo();
		$this->data['style']							 = (isset($setting['style']) && ($setting['style']==Type_ActionPromotionStyle::Tp_StyleMenu)) ? $setting['style'] : '' ;
        $this->data['product_list_title_style'] =  $this->config->get('product_list_title_style');

        $this->data['productListTitle'] = array(
            'heading_title' => ($this->config->get('special_action_title')) ? $this->config->get('special_action_title') :$this->language->get('heading_title'),
            'heading_subtitle' => $this->config->get('special_action_subtitle') ? $this->config->get('special_action_subtitle') : '',
            'link' => (isset($this->data['link'])) ? $this->data['link'] : '',
        );

        $this->productlistitle->setProductListTitle($this->data['productListTitle']);

		$this->children = array(
            'common/product_list_title',
        );

		$this->render('module/special_action');
	}

}
