0

I am at the copy-paste stadium of PHP coding, so I would like to be pointed in the right direction here.

On this page:

http://anansi.dk/index.php?option=com_configbox&view=category&prod_id=2&cat_id=27&Itemid=227&lang=da

I am trying to load a module called mod_hot_joomla_carousel_pro at the bottom - beneath the other elements. The way I am trying to do this is by using the same strip of PHP used for including the price module, inside the template. It looks like this:

<?php 
   include_once(KPATH_ROOT.DS.'modules'.DS.'mod_hot_joomla_carousel_pro'.DS.'mod_hot_joomla_carousel_pro.php');
?>

It works - sort of - you can see the arrows. But how do I get it to load the specific module instance, with the pictures and all?

Best, Astrid

bragboy
  • 34,892
  • 30
  • 114
  • 171
Aztrid
  • 23
  • 7

1 Answers1

0

You want to display module on the page? Better add position of module and adjust module on this position <jdoc:include type="modules" name="position-0" /> But if you want include module, better do it in such way

<?php
$doc = JFactory::getDocument();
$module = JModuleHelper::getModule('mod_hot_joomla_carousel_pro',$title);
//get and update params
$params = new JRegistry;
$params->loadString($module->params);
$params->set('some_param_of_module',$some_value);
//render module
$renderer = $doc->loadRenderer('module');
$content = $renderer->render($module, array('params'=> $params));
print $content;
?>
wearwoolf
  • 386
  • 1
  • 2
  • 10
  • oh, sorry. stupid copy-paste :). i use (sometimes) such way of connection of module from j1.5 – wearwoolf Mar 05 '13 at 14:59
  • Thank you for your reply! It works now - I use tha Joomla built-in module placement feature instead. It just had not crossed my mind :-! – Aztrid Mar 06 '13 at 20:05