szanaszabolcs Posted December 5, 2016 Share Posted December 5, 2016 (edited) Hi, I would like to add a prarameter to blocktopmenu getCacheId() method. Which includes that the user is logged in or not and i see the value in the blocktopmenu.tpl template file. So i want a variable like {$logged} but the cache don't save the value. this is the method: protected function getCacheId($name = null) { $page_name = in_array($this->page_name, array('category', 'supplier', 'manufacturer', 'cms', 'product')) ? $this->page_name : 'index'; return parent::getCacheId().'|'.$page_name.($page_name != 'index' ? '|'.(int)Tools::getValue('id_'.$page_name) : ''); } Edited December 5, 2016 by szanaszabolcs (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