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.

 

[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?

MrPippoTN
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

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

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
3313 Posts
User info in posts
Administrator has disabled public posting

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.

MrPippoTN
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: [solved] Hiding some modules in K2 item view

Glad it worked - thanks for reporting 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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10789
Newest User:
parus6
Members Online:
1
Guests Online:
279

Online: 
parus6

Forum Legend:

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