Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » hiding module from k2 item pages
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
27-Sep-13 18:35:24
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
- Index
- » MetaMod
- » MetaMod General Support
- » hiding module from k2 item pages
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7667
- Newest User:
- humble2601
- Members Online:
- 0
- Guests Online:
- 161
- 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