Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Control modules based on k2 item id
Page:
1
Control modules based on k2 item id
Re: Control modules based on k2 item id
Yes, you can do that quite easily, especially in the latest version of MetaMod (make sure you have the latest one) that has specific K2 support.
The PHP used could be this:
$k2 = JomGenius("k2");
if (! $k2->check("pagetype = item.view")) return; // do nothing if it's not an item page
$item_id = $k2->info("item_id");
if ($item_id == 10) return 100;
if ($item_id == 11) return 101;
if ($item_id == 12) return 102;
// add more as appropriate. the 2st number is the item id, and
// the 2nd number is the module to return for that item.
Administrator has disabled public posting
Page:
1
- Index
- » MetaMod
- » MetaMod General Support
- » Control modules based on k2 item id
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7620
- Newest User:
- giachungjsc
- Members Online:
- 0
- Guests Online:
- 163
- 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