Post by winpeace » Sat Apr 23, 2011 3:32 pm

I want to hide some modules for all pages.
How?
Note:I dont want to close module

New member

Posts

Joined
Mon Feb 07, 2011 4:08 am

Post by SXGuy » Sat Apr 23, 2011 4:41 pm

catalog/view/theme/yourtheme/template/module

pick the module you dont want to be displayed.

open it in a editor

add at the very top of the page

Code: Select all

<?php if (isset($this->request->get['route']) && ($this->request->get['route'] == 'product/product' || $this->request->get['route'] == 'product/category' || $this->request->get['route'] == 'common/home' || $this->request->get['route'] == 'information/information' || $this->request->get['route'] == '/')) { ?>
Basically, you need to add every route you can think of so it doesnt show on that page.

then at the very end of the module file you need to add

Code: Select all

 <?php } ?>

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by winpeace » Sat Apr 23, 2011 4:44 pm

thanks but not hide. :(
I want to hide cart module all pages and main page.

New member

Posts

Joined
Mon Feb 07, 2011 4:08 am

Post by scott23 » Sun Apr 24, 2011 12:17 am

I'm not really sure why you want to hide the cart module on all of the pages but to do that you do not need to edit any code. Just go under Admin -> Extensions -> Modules and disable it.

User avatar
New member

Posts

Joined
Sun Feb 06, 2011 6:08 am

Post by SXGuy » Sun Apr 24, 2011 1:59 am

Sorry my code was for displaying module in certain pages, try this, it should work, but as scott23 said, just disable it if you want to not show it on any page. anyway it should be

Code: Select all

<?php if (!isset($this->request->get['route'])) { ?>
then at the bottom of the file

Code: Select all

<?php } ?>

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am
Who is online

Users browsing this forum: No registered users and 2 guests