Keyword

Check for module positions in k2 item view

  • Joom_Lee
  • Joom_Lee's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month ago #117820 by Joom_Lee
Hello,

I want to check module positions for a sidebar in k2 item view. It is still an old 1.5.26 site since the owner thinks it works fine.

What did I try:
So far I tired all code snipets I found in the forum. This means all variations of

/* get all Modules assigned to Position 'latest' */
$latestItem = &JModuleHelper::getModules( 'latest' );

/* loop through the array and render their output */
foreach ($latestItem as $latest) {
$_options = array( 'style' => 'xhtml' );
echo JModuleHelper::renderModule($latest,$_options);
}

I observe two things: First I am only able to call types of modules, not positions. E.g. when I call mod_k2_tools, it is displayed, if I call 'left' - no chance.
Second I could not call mod_custom using the same code.

What should be the result?
How should the code be altered to be able to check for module positions virtually design (=not a default template position) for the sidebar in question. Is it possible to call any type of Joomla module, not only k2 modules?

Thanks a lot

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 month ago #117821 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Check for module positions in k2 item view
Hello Joom_Lee,

You can use any module you want. This is Joomla! stuff/ not only K2 so you can pretty much do anything you want to do.

You need to read this post however. getk2.org/community/New-to-K2-Ask-here-first/179348-Adding-advert-at-end-of-every-article

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