erehcab Posted April 21, 2010 Share Posted April 21, 2010 Bonjour à tous, J'aimerai pouvoir récupérer l'identifiant de la catégorie en cour depuis le template header.tpl. J'ai essayé de le récupérer via {$category->id} mais ça n'a pas fonctionné ... Link to comment Share on other sites More sharing options...
erehcab Posted April 21, 2010 Author Share Posted April 21, 2010 Trouvé !!! j'ai ajouté ce code dans le fichier header.php se trouvant à la racine : if (isset($_GET['id_category']) OR Validate::isUnsignedId($_GET['id_category'])){ $category = new Category(intval(Tools::getValue('id_category')), intval($cookie->id_lang)); $smarty->assign(array( 'id_category' => intval($category->id) )); } 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