Jump to content

<solved>How to hide a module in certain page


Recommended Posts

  • 2 weeks later...
  • 6 years later...
hace 1 hora, Max Clee dijo:

how can i assign to some but not all page categories ? 
the module should appear if it is assigned to a specific category page & their products  but others not. 

Edit class the module and block when it is on that specific page  in the hook 'x'

for example, no show module 'x' when you are in the content page (cms) with id 6 => https://victor-rodenas.com/ocultar-modulo-por-pagina-de-contenido-en-prestashop-1-7/

For product id 6

$id_product = Tools::getValue('id_product');
if ($id_product==6) return;

By the way, you have written in a topic of the year 2012, the normal thing is to create a new topic for the doubt.

Sorry for my English

----

 

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

  • 2 years later...
On 2/17/2012 at 7:08 PM, cedricfontaine said:

You'll add to go to the module configuration, then manage hooks.

Then click the edit button and add pages exceptions.

I tried to disable the category tree module in the New products-page by finding the hook displayLeftColumn (where it is shown) and set up an exception for "newproducts", but it is still present. I have cleared the cache. 

Any idea? I am using PS v1.7.7.1.

With kind regards,
 - Johan.

Link to comment
Share on other sites

1 hour ago, Prestachamps said:

Hi Johan,

you can disable it by going onto Backoffice design- >positions, select module "Category tree links , and edit the Hook of DisplayLeftColumn , then select the "newproducts" from the ___CORE___ section.

Kind regards, Leo

Hi,

That is exactly what I have done, but it is still present! Check the attached screenshots. 

I have no cache activated and the Force compilation is enabled. I have cleared the cache, but no change.

Please advise...

_1.png

_2.png

Link to comment
Share on other sites

I managed to solve this. Though the core module in Exceptions was named "newproducts", I noticed that the page was named "new-products" in the admin, in "Traffic & SEO". So I entered manually "newproducts,new-products" in the field of exceptions, instead of just clicking at the module "newproducts", and now it works. 

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...