Keyword

Getting a module to display before comments

  • bringrice
  • bringrice's Avatar Topic Author
  • Offline
  • New Member
More
9 years 7 months ago #132283 by bringrice
Hey K2 community!

Alright, so I have a module that needs to be placed directly before the comment section.

Right now it's like this:


And I want it to appear like this:


The reason why I would like the module to appear just before the comment section is to take advantage of the full width of the container that it resides in. That's the reason why I can't get this done via {loadposition blah} placed at the end of the article.

I tried cutting/pasting the module position in the .php just before the comment section, but it really threw off the entire template.

Can anyone help me with this, specifically which segment I should cut and where exactly I should paste it?

Here's what I've been cutting/pasting:
<?php if($this->API->modules('mainbody_bottom')) : ?>
						<section id="gkMainbodyBottom">
							<jdoc:include type="modules" name="mainbody_bottom" style="<?php echo $this->module_styles['mainbody_bottom']; ?>" />
						</section>
						<?php endif; ?>

Thanks! The site is not up yet, so I can't provide a preview of it.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #132284 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Getting a module to display before comments
This will not work.
You need to paste it in item.php an example can be found here:
<?php foreach (JModuleHelper::getModules('MODULE_NAME') as $module) {                                
echo JModuleHelper::renderModule($module, array('style' => 'MODULE_STYLE'));            
}?>

To locate and override item.php please read this post:
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

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