Keyword

Show Metamod only k2article view and not cat view

  • alraziassociates kollam
  • alraziassociates kollam's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114458 by alraziassociates kollam
Show Metamod only k2article view and not cat view was created by alraziassociates kollam
Dear Sir,

How to show metamod module only on k2 article view and not category view

Normal Article codeif ( $core_genius->check("pagetype = article")) return 576;) .... is ok

but k2 article view page is not work



Please Adwise


Regards,

alrazi

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 months ago #114459 by Yiota

Please Log in or Create an account to join the conversation.

  • alraziassociates kollam
  • alraziassociates kollam's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114460 by alraziassociates kollam
Replied by alraziassociates kollam on topic Re: Show Metamod only k2article view and not cat view
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view')

and

<?php if(!($option=='com_k2' && $view=='item')): //if it is not an item procceed ?>
// enter your module position here.
<?php endif; ?>

the code is error ............

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 months ago #114461 by Yiota
This code snippet should be placed in your index.php of the template you are using for the module position which you want this module to load.
Now, the code should be rather like
<?php if($option=='com_k2' && $view=='item'): //if it is an item procceed ?>
// enter your module position here.
<?php endif; ?> 

PS: Don't forget to add the definitions before the if.

$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');

and make sure that these definitions are not already defined in your template files.

Please Log in or Create an account to join the conversation.

  • alraziassociates kollam
  • alraziassociates kollam's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114462 by alraziassociates kollam
Replied by alraziassociates kollam on topic Re: Show Metamod only k2article view and not cat view
Please Video help or any link

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum