Thursday 12 June 2008 11:44:40 pm
Hi, The most simple (but not the only way) is the xajax extension : http://ez.no/developer/contribs/applications/xajax The API can be found : http://www.xajaxproject.org/ Here an exemple of xajax module with a template fetch :
function xxxx($object_id) {
// HTTP Response
$objResponse = new xajaxResponse();
// template init
$tpl =& templateInit();
// Add Variable to the template
$tpl->setVariable('object_id', $object_id);
// fetch template
$html = $tpl->fetch( "extension/mod_myextension/design/standard/templates/foo/bar.tpl" );
$objResponse->addAssign("mydiv", "innerHTML", $html);
// response
return $objResponse;
}
HTH...
|