Jump to content

Variables for a module.


Recommended Posts

This is giving error where I am assigning the value. So no meaning of using it anywhere. I am attaching the file where i am trying to use it. Please tell where I am going wrong.

 

public function hookLeftColumn( $params )
 {
  global $smarty;
  //public $current_date;
  $this->context->smarty->assign(
        array(
           // 'my_module_name' => Configuration::get('MYMODULE_NAME'),
           // 'my_module_link' => $this->context->link->getModuleLink('mymodule', 'display'),
            'my_module_message' => $this->l('This is a simple text message'), 
 
        )
 
$current_date = date("d/m/Y");
$smarty->assign('current_date',$current_date);
    );
     
  return $this->display(__FILE__,'mymodule.tpl');
  }
 
 
Regards
Link to comment
Share on other sites

$this->context->smarty->assign( is unclosed
you have to close it (see red closing sign)

        $this->context->smarty->assign(
        array(
           // 'my_module_name' => Configuration::get('MYMODULE_NAME'),
           // 'my_module_link' => $this->context->link->getModuleLink('mymodule', 'display'),
            'my_module_message' => $this->l('This is a simple text message'), 
 
        )
 
);
 
$current_date = date("d/m/Y");
$smarty->assign('current_date',$current_date);
    );

 

 

Link to comment
Share on other sites

×
×
  • Create New...