devmurk Posted June 8, 2018 Share Posted June 8, 2018 (edited) Hi everyone I need to hide a module only in homepage, i'd try to modify the tpl file as the following way but it doesn'y work {if $page_name != 'index'} {hook h='displayMainMenu'} {/if} Any tip? Thank you! Edited June 8, 2018 by Garou42 Solved post (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted June 8, 2018 Share Posted June 8, 2018 (edited) hace 22 minutos, Garou42 dijo: Hi everyone I need to hide a module only in homepage, i'd try to modify the tpl file as the following way but it doesn'y work {if $page_name != 'index'} {hook h='displayMainMenu'} {/if} Any tip? Thank you! Hi, How are you? What version of Prestashop do you use? The code that shows that "you want to hide a hook" on the main page. If it is a module in particular, in principle the conditional should be in the TPL of the module. In PS 1.7 is -> {$page.page_name} to check what section you are in. In PS 1.6 is -> {$page_name} --------------- By the way, from the admin panel in the tab modules -> positions (in PS 1.7 Design -> Positions) you can put exceptions to the modules to decide which sections you want to show them Attached capture Sorry for my English Edited June 8, 2018 by nadie (see edit history) 1 Link to comment Share on other sites More sharing options...
devmurk Posted June 8, 2018 Author Share Posted June 8, 2018 Thanks nadie It was about version, i'm using v1.7 and i was intruducing the wrong sentence, then the correct form is "{$page.page_name} " I follow you for years, and thanks to your contributions in the prestashop community I have solved hundreds of doubts. You are a big one mate! Gonna move it to solved 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