Jump to content

Solved - Hide modulo only in homepage


Recommended Posts

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

aj.png.27715a9bd0a683a3c7618abe26c3938e.png

Attached capture
 

Sorry for my English

Edited by nadie (see edit history)
  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...