jd440 Posted August 11, 2014 Share Posted August 11, 2014 (edited) Bonjour à tous., J'ai un souci de mise en cache d'un module que j'ai crée; J'ai: function hookRightColumn($params) { if (!$this->isCached('blockfanfb.tpl', $this->getCacheId())) { [...] } return $this->display(__FILE__, 'blockfanfb.tpl', $this->getCacheId()); } puis dans mon template {if ($page_name !="order")} [..] {/if} Mais du coup la mise en cache empeche le controle par page. Voyez vous un moyen d'allier les deux? Edited August 11, 2014 by jd440 (see edit history) Link to comment Share on other sites More sharing options...
jd440 Posted August 11, 2014 Author Share Posted August 11, 2014 (edited) Et voici ma solution. function hookRightColumn($params) { $page_en_cour = $this->context->smarty->tpl_vars['page_name']->value; $cacheId = $this->getCacheId($this->name.'|produt|'.Tools::getValue('id_product')); if (!$this->isCached('blockfanfb.tpl', $cacheId)) { [...] $smarty->assign(array( [...] 'ou_on_est' => $page_en_cour )); } return $this->display(__FILE__, 'blockfanfb.tpl', $cacheId); } template {if ($ou_on_est !="order")} [..] {/if} Edited August 11, 2014 by jd440 (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