- Posts: 2
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Is possible to load a module position inside K2 Template ?
Is possible to load a module position inside K2 Template ?
- Pixocom
- Topic Author
- Offline
- New Member
Less
More
14 years 11 months ago #74518
by Pixocom
Is possible to load a module position inside K2 Template ? was created 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 ?
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.
- Lachlan MacKinven
- Offline
- New Member
Less
More
- Posts: 8
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?
Anyone else made any progress with this?
Please Log in or Create an account to join the conversation.
- Zandergraphics
- Offline
- Junior Member
Less
More
- Posts: 20
14 years 3 months ago #74520
by Zandergraphics
Replied by Zandergraphics on topic Is possible to load a module position inside K2 Template ?
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...
< ?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.
- andre.balian
- Offline
- New Member
Less
More
- Posts: 7
13 years 2 months ago #74521
by andre.balian
Replied by andre.balian on topic Is possible to load a module position inside K2 Template ?
Hey thanks for this, it works great. (Just remember to take the space out between the < and the ? folks)
Definitely better late than never ;)
Definitely better late than never ;)
Please Log in or Create an account to join the conversation.
- 9Themestore
- Offline
- New Member
13 years 1 month ago #74522
by 9Themestore
Nice Theme Store
Replied by 9Themestore on topic Is possible to load a module position inside K2 Template ?
Thank Kyle,
I worked. it works great.
I worked. it works great.
Nice Theme Store
Please Log in or Create an account to join the conversation.
- Johnny Dao
- Offline
- New Member
Less
More
- Posts: 3
11 years 2 months ago #74523
by Johnny Dao
Replied by Johnny Dao on topic Re: Is possible to load a module position inside K2 Template ?
Thanks for your support. I've done with your code.
Thank you :D
Thank you :D
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Is possible to load a module position inside K2 Template ?