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.

 

hiding module from k2 item pages

hiding module from k2 item pages

Hello,

I'm trying to view a module (id 208) on a specific menu item page (id 117)
while hiding that same module from the k2 item view pages which are clicked and brought up from within that module.

so the module 208 has menu assignment set to none, my metamod module is set to appear on all pages and it has the following php code:

if ($Itemid = 117) return 208;
//to assign the module to the page

if (JFactory::getApplication()->input->get('option') == 'com_k2' && JFactory::getApplication()->input->get('view') == 'item') {
unset "208";
}   //to hide the module from the k2 item pages

each of these codes work on their own but not combined. So basically I can either show the module on the menu item page + k2 item pages or hide it completely.

mobylak.com/en/specifications

that is where the module is, try to click any of the phones (k2 items) from within the module, the item will show but the module would still show above it.

Any work arounds?

Thank you

Edited By: shelby67
27-Sep-13 17:35:24

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

Re: hiding module from k2 item pages

Thank you I think I have fixed it.

replaced the code with:

if ($Itemid == 117
  and !(
    $option == 'com_k2'
    and $view == 'item'
    )
   ) { return 208;
}

it would seem to me the code is saying display the module if in k2 item view but surprisingly it works now fine, module is assigned to menu item but not in the k2 items view within that menu item.

Thanks

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10772
Newest User:
alton29318
Members Online:
0
Guests Online:
148

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