Keyword

Is possible to load a module position inside K2 Template ?

  • Pixocom
  • Pixocom's Avatar Topic Author
  • Offline
  • New Member
More
14 years 11 months ago #74518 by Pixocom
Is it possible to load a module position inside the k2 template ?

I tried adding the traditional module position code of joomla in joomla templates

But I get errors like Fatal error: Call to undefined method K2ViewItem::countModules()

Is there any particular sintax to load a module position inside the K2 Template ?

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

More
14 years 8 months ago #74519 by Lachlan MacKinven
Replied by Lachlan MacKinven on topic Is possible to load a module position inside K2 Template ?
I am very much wanting to do this too... wanting to load up a module in between the article and comments area on healthyeatingrecipes.org/

Anyone else made any progress with this?

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

More
14 years 3 months ago #74520 by Zandergraphics
Better late than never I guess... I came across this same problem and this is the code I used to accomplish it:

< ?php
jimport( 'joomla.application.module.helper' );
$modules = JModuleHelper::getModules( 'moduleposition' );
foreach ($modules as $module) {
echo JModuleHelper::renderModule( $module );
}
?>


Obviously, change moduleposition to the module position you want to load... and remove the extra space in the opening tag...

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

More
13 years 2 months ago #74521 by andre.balian
Hey thanks for this, it works great.  (Just remember to take the space out between the < and the ? folks)

 

Definitely better late than never ;)

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

More
13 years 1 month ago #74522 by 9Themestore
Thank Kyle,

I worked. it works great.

Nice Theme Store

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

More
11 years 2 months ago #74523 by Johnny Dao
Thanks for your support. I've done with your code.
Thank you :D

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


Powered by Kunena Forum