Melander Posted August 23, 2012 Share Posted August 23, 2012 (edited) I try to use $smarty->assign() inside a hook (I created a hook in the blockcategories module. The problem is that this parameter has the same value in the other hook(s). This is the code: -------------------------------------------------------------------- blockcategories.php public function install() { //... !$this->registerHook('top') OR //... } public function hookTop($params) { global $smarty; $smarty->assign('isInTopOfPages', true); return $this->hookLeftColumn($params); } -------------------------------------------------------------------- I wish to display this blockcategories module differently based on whether it's in the hook I created or a different one. Any thoughts? -------------------------- SOLUTION -------------------------- Modified hookLeftColumn() to take an argument that specifies which template to display: public function hookLeftColumn($params, $template = 'blockcategories.tpl') { //... $display = $this->display(__FILE__, $template, $smartyCacheId); Edited August 23, 2012 by Melander (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now