1
Does anyone know how I can render a few blocks from one module inside a page in a custom module? Here's the scenario:
I have written a very simple custom module that has only one functional page: index.php. In this page, I want to display blocks from other modules
embedded in the module body, rather than in the XOOPS left- or right-hand columns. In other words, I want to display the contents of some blocks inline, without relying on a XOOPS theme or the XOOPS admin->blocks to position blocks.
For example, I can place the following code in my module index.php to display a mini calendar from the extcal module:
require_once (XOOPS_ROOT_PATH.'/modules/extcal/blocks/extcal_blocks.php');
if ($block = b_extcal_minical_show ($options)) {
$GLOBALS['xoopsOption']['template_main'] = 'extcal_block_minical.html';
$xoopsTpl->assign('block', $block);
}
However, I can't do that
again later in the same file, like so:
if ($block = b_extcal_minical_show ($options)) {
$GLOBALS['xoopsOption']['template_main'] = 'extcal_block_upcoming.html';
$xoopsTpl->assign('block', $block);
}
My guess is that setting the 'template_main' key can only be done once per page. How can I modify my code to display more than one block?