Jump to content

How to include tpl file on mainpage


ZeroTolerance

Recommended Posts

Hi. I have a problem with include tpl file in to mainpage. I have a code:

function install(){
			if (!parent::install())
				return false;
			if (!$this->registerHook('home'))
				return false;
			return true;
		}

		function hookHome($params){
			return $this->display(__FILE__, 'popup.tpl');
		}

But 'popup.tpl' didnt display onpage. I must write hook in template?

Thanks for any help :)

Link to comment
Share on other sites

Yeah, i hook it in "home". I have a code:

function hookDisplayHome($params){
			$this->context->smarty->assign(
			    array(
			        'popup-header' => Configuration::get('popup-header'),
			        'popup-content' => Configuration::get('popup-header')
			    )
			);
			return $this->display(__FILE__, 'popup.tpl');
		}

But i think prestashop engine don't try use that function bicause i write:

die('ASDA');

but page still work. Module are instaled.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...