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.

 

Showing on articles not in category K2

Showing on articles not in category K2

Hi, I want to display modules only in item in category not in category. (K2)

Im trying this:

Code:


if (

  $option == "com_k2"

  and $view == "itemlist"

  and (JRequest::getVar('layout') == "category" or JRequest::getVar('task') == "category")

) return XXX

but this is only showing in category.

Can you help me?

kowczarek
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Showing on articles not in category K2

Hi,

there are some special functions built in to MetaMod for detecting K2 page types. Try this:

$k2 = JomGenius("k2");
if ($k2->check("pagetype = item.view")) return XXX;
// replace XXX with module ID to display on item view pages.

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

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5940
Total Posts Today:
1
User Info:
 
Total Users:
5186
Newest User:
Totosite
Members Online:
0
Guests Online:
135

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