- Posts: 3
COMMUNITY FORUM
Show Metamod only k2article view and not cat view
- alraziassociates kollam
- Topic Author
- Offline
- New Member
Less
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
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
- Visitor
11 years 3 months ago #114459
by Yiota
Replied by Yiota on topic Re: Show Metamod only k2article view and not cat view
Maybe this post will help you:
getk2.org/community/New-to-K2-Ask-here-first/178481-How-to-show-module-only-on-k2-item-page-only
getk2.org/community/New-to-K2-Ask-here-first/178481-How-to-show-module-only-on-k2-item-page-only
Please Log in or Create an account to join the conversation.
- alraziassociates kollam
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
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 ............
$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
- Visitor
11 years 3 months ago #114461
by Yiota
Replied by Yiota on topic Re: Show Metamod only k2article view and not cat view
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
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
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.