I tried the following code:
$document = JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$position = 'precisions';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);
I can render modules anywhere I tried in php code, but I cannot render nested modules in templates files, as I could in articles… They are printed as raw placeholder, like '{loadposition module}'
.
I tried to figure out what happens with the debugger, but seems that, at first, the nested modules is parsed, then, it is wipe out by the parent content.
What should I do to get the same result than Joomla inside articles, but in templates? How can I avoid this wipe out?