Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

How to hidden a module for a specific page?

How to hidden a module for a specific page?

Hi there,

I have Joomla 1.5, VirtueMart 1.1 and MataMod 2.3 installed.
I have right side navigation bar (the product category module) displayed for other pages. But for the shopping cart page, I want only shopping cart displayed without the navigation bar. How can I just hidden the navigation bar with MataMod?

Thank you very much.

Edited By: leon5wu
17-Mar-10 20:46:40

leon5wu
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: How to hidden a module for a specific page?

Hi Leon,

first, please make sure you read and understand the Quick Start guide: http://www.metamodpro.com/metamod/quick-start

Then, set up the navigation bar module as normal, except have it unpublished (or assigned to a module position that does not exist on your page).
Then set up a MetaMod for ALL pages on the site, or at least for all the pages that your navigation module was originally set to.
Ensure the MetaMod is published.
Then use the following PHP code inside MetaMod:

if ( ! ($option == "com_virtuemart" and JRequest::getVar("page") == "shop.cart" ) ) return XXX;
/* replace XXX with the module id of the module that you want to show on every page EXCEPT the shopping cart page. */

I wonder if you want the navigation hidden on all the checkout pages as well? or just the cart page? If you need to tweak it some more just write back.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: How to hidden a module for a specific page?

Hi Stephen,

I did that following the instructions you posted and I got what I expected for hidden/show the module. That's awesome.
I have a little problem. When I visit the shopping cart page, the navigation is disappeared and that's great. But, the left column is still there. The shopping cart page is 80% width instead of 100% (I guess it is because of the Itemid). Do you have comments how I can work it around?

Thank you very much!

Leon

leon5wu
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: How to hidden a module for a specific page?

Hi Leon,

See this FAQ:

http://www.metamodpro.com/metamod/faq/2 … etamod-was

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5351
Newest User:
rosas54448
Members Online:
1
Guests Online:
116

Online: 
rosas54448

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked