Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] Hiding some modules in K2...
[solved] Hiding some modules in K2 item view
[solved] Hiding some modules in K2 item view
Hello. I'd like to hide some modules I put on the right column of my Joomla 3.2 website when I open a K2 item view, but I can't.
I've tried to put this code in a MetaMod Module but it does not work:
if ($option == "com_k2" and ($view == "category" or $view == "itemlist") ) {
return "107,108,115";
}
Can you help me, please?
Re: [solved] Hiding some modules in K2 item view
Did you follow the instructions in the Quick Start guide? i.e. you need to make sure the target module is disabled or set to a nonexistent module position, so it doesn't show up until MetaMod includes it. From the code you included above, it looks like you want it on the k2 category and itemlist pages only.
Also, try turning on MetaMod's Advanced Debug mode. This will spit out some PHP code which you might want to check against the code above, particular with regard to the exact content of the URL's "view" parameter.
Hope that helps,
Stephen
Re: [solved] Hiding some modules in K2 item view
Thank you, that helped. Now I've almost solved using this PHP code:
if ( ! (
$option == 'com_k2'
and $view == 'item'
) ) return 107;
But I still have a little problem. This one: http://www.metamodpro.com/metamod/faq/2 … etamod-was
Edit: nevermind, solved. I purchased Pro Version.
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] Hiding some modules in K2...
Board Info
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked