nwrightau VIP
Total posts: 99
24 Sep 2014 02:52

Possible to load a Joomla module as a cobalt field?


Jeff VIP
Total posts: 745
24 Sep 2014 03:15

You could:

http://docs.mintjoomla.com/en/cobalt/create-field/

But it is easier to create a custom template where you incorporate a Joomla module or module position

http://docs.mintjoomla.com/en/cobalt/custom-templates-general/

http://docs.mintjoomla.com/en/cobalt/custom-templates-article/

You could then add in your template:

$modules =& JModuleHelper::getModules('customposition');
foreach ($modules as $module)
{
    echo '<h3>'.$module->title.'</h3>';
    echo JModuleHelper::renderModule($module);
}

nwrightau VIP
Total posts: 99
24 Sep 2014 04:20

Ah thanks! That's exactly what I was trying to do but I was using the jdoc include statements and they weren't working. Will give that a try.


nwrightau VIP
Total posts: 99
24 Sep 2014 04:41

That worked nicely, thanks.

Powered by Cobalt