Jump to content

Edit History

Luis C

Luis C

That's how modules work after all. You call your hook from a theme template file, then your module calls its own template file. At any rate, correct me if I'm wrong, but you can't assign a smarty variable inside a module, and then use it in a theme template file outside your module, because you've assigned that variable inside a method/function, and you can only use it if you make an instance of the class (yourModule class). If storing a loop inside your object/variable is all your module does, you're safe removing your "Return $caronteProducts" line and adding  return $this->display(__FILE__, 'file.tpl'); it should not make an infinite loop.

 

If you feel safe doing so, please share your module main php file and I'll take a look

 

 

Luis C

Luis C

That's how modules work after all. You call your hook from a theme template file, then your module calls its own template file. At any rate, correct me if I'm wrong, but you can't assign a smarty variable inside a module, and then use it in a theme template file outside your module, because you've assigned that variable inside a method/function, and you can only use it if you make an instance of the class (yourModule class). If storing a loop inside your object/variable is all your module does, you're safe removing your "Return $caronteProducts" line and adding  return $this->display(__FILE__, 'file.tpl'); it should not make an infinite loop.

 

 

×
×
  • Create New...