Keyword

Selective display of K2content module

  • Mats Arvendal
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
9 years 6 months ago #142203 by Mats Arvendal
Selective display of K2content module was created by Mats Arvendal
Hi,
I need to display an instance of a K2content module on category blog list views only. I once did this in Joomla core article management (v 2.5) by using these PHP in the template index.php:
<?php if( JRequest::getVar( 'view' ) == 'category' ): ?>
<jdoc:include type="modules" name="onlycategorylists" style="xhtml" />
<?php endif; ?>
At least as far as I remember, though.

How do I do this when using K2?

Best rgds

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #142216 by Krikor Boghossian
Replied by Krikor Boghossian on topic Selective display of K2content module
You can use these conditional tags:
JRequest::getCmd('option') ==  'com_k2' && JRequest::getCmd('view') == 'itemlist'  && JRequest::getCmd('task')  ==  'category'

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Mats Arvendal
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
9 years 6 months ago #142224 by Mats Arvendal
Replied by Mats Arvendal on topic Selective display of K2content module
Thanks, Krikor!
Exactly what I needed. Works like a charm!

Best rgds

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #142229 by Krikor Boghossian
Replied by Krikor Boghossian on topic Selective display of K2content module
You 're welcome Mats :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum