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.

 

Hide modules by position.

Hide modules by position.

Hi-

I would like to hide all modules in a specific position when in article view.  So for example I would like to hide all modules in user14 when in article view.

I put user14 in the quick module position box and the following code in the php box:

if ( $option == "com_content" and $view == "article") return null;

Doesn't seem to be working.  Does anyone know how to set this up?

Thanks!

Best,
Fran

franjaco
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Hide modules by position.

Hi Fran,

Another good way to set this up, in your situation, is to ignore the Quick Module Id Include box, and simply use this in the PHP box:

if ( $option == "com_content" and $view == "article") return "user14-metamod";

Now, this is assuming that the MetaMod is assigned into the "user14" position. So I would recommend that you put all the other modules into the "user14-metamod" position (you can type that in to the "Position" box even when it doesn't appear in the dropdown).

That way, you can easily manipulate which modules get put into the user14 position by putting them into the user14-metamod position instead. Then MetaMod pulls all these modules into the user14 position when someone is viewing an article.

Hope that helps,
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: Hide modules by position.

Hello from Greece!
Well, I try to make something similar with metamod. I try to show a module on the right column of a Yootheme template, for every article of a category "beaches", and hide that from the Category layout.
I used the code, it seems to work (the module appears) for articles. However, in category layout, the module does not show up (as wanted), but the right column has been allocated and the template gets narrower.
Can I solve that?

aroniotis
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Hide modules by position.

Hi aroniotis,

this is a FAQ - you probably need the Pro version to get around this.

See these for explanations:

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

Best regards,
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:
1697
Total Polls:
6
Total Posts:
5941
Total Posts Today:
1
User Info:
 
Total Users:
5420
Newest User:
bandtfl7
Members Online:
0
Guests Online:
119

Online: 
There are no members online

Forum Legend:

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