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.

 

Can't find the Recipe for k2 items/category

Can't find the Recipe for k2 items/category

For some reason i cant seem to find the receipe for how to add meta mod on k2 items or category only pages. Is there a simple recipe for this? I know how to find the item info i just need the code i copy and paste.

One if adding multiple modules only to  k2 item(or items)
One if adding multiple modules only to a category(categories)

Thanks in advance!

tclarke
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: Can't find the Recipe for k2 items/category

Code:

// return multiple modules on item view pages

$k2 = JomGenius("k2");
if ($k2->check("pagetype = item.view")) return "232, 463, 252";

// return multiple modules on specific item view pages (id 34, 35, 36)
$k2 = JomGenius("k2");
if ($k2->check("pagetype = item.view") and $k2->check("item_id = 34, 35, 36")) return "232, 463, 252";

// return multiple modules on all category pages
$k2 = JomGenius("k2");
if ($k2->check("pagetype starts with category") ) return "232, 463, 252";

// return multiple modules on specific category pages (id 101, 102, 103)
$k2 = JomGenius("k2");
if ($k2->check("pagetype starts with category") and $k2->check("category_id = 101,102,103")) return "232, 463, 252";

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:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
181

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