Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Hide modules by position.
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
Re: Hide modules by position.
solved using http://www.metamodpro.com/forums/topic?id=77
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
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?
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
- Index
- » MetaMod
- » MetaMod General Support
- » Hide modules by position.
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 165
- 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