0

I want to assign some modules into category page of K2. In another words I want to change the K2 category page's module with the one which I want. How am I suppose to do that?

Mohsen
  • 3
  • 5

1 Answers1

0

In your project find out this file path components\com_k2\templates\default\category.php then place the code with your module name

jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('header'); 
foreach($modules as $module)
{
echo JModuleHelper::renderModule($module);
}

Note: please make the module visible for all page (show all pages)

Shaymol Bapary
  • 468
  • 3
  • 11
  • I am new in this, please tell me what the line 2 means I mean what should I put there, then which line should I put this code in? – Mohsen Oct 20 '15 at 12:35