Index: trunk/include/xpress_block_render.php
===================================================================
--- trunk/include/xpress_block_render.php	(revision 49)
+++ trunk/include/xpress_block_render.php	(revision 89)
@@ -104,6 +104,6 @@
 		$inc_theme_file_name = $call_theme_function_name . '_theme.php';
 		$cache_title = str_replace(".php", "", $block_function_name);
-		$blockID =get_block_id($mydirname,$func_file,$options);			
-					
+		$blockID =get_block_id($mydirname,$func_file,$options);		
+
 		if (!is_null($wpdb)){
 			xpress_block_css_set($mydirname);
@@ -119,5 +119,10 @@
 			$block = $xml['block'];
 		}
-		return 	$block;
+
+		$templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name);
+		$tpl =& new XoopsTpl() ;
+		$tpl->assign( 'block' , $block ) ;
+		$ret['content'] = $tpl->fetch( $templates_file ) ;
+		return $ret ;
 	}
 	
