11
trabis
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/8 18:56

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Using php block you can do this
?>

<div>some html here</div>
<div>

<?php
$block_id 
= 1; //choose your block id
include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
$blockObj = new XoopsBlock($block_id);
$result = $blockObj->buildBlock();
$tplName = ($tplName = $blockObj->getVar('template')) ? "db:{$tplName}" : "db:system_block_dummy.html";
$GLOBALS['xoopsTpl']->assign('block', $result);
$GLOBALS['xoopsTpl']->display( $tplName);
?>

</div>
<div>more html here</div>

12
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/8 23:13

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


trabis thank you...it is working to call any block

except the mytabs blocks


cache cleared
xoops 2.3.3