Code: Select all
[../..]some stuff regarding registering the module (basicely add to the modules[] array the names of the functions and other parameters if required)
function pre_process_thisone($module)
{
[../..]initialisation specific to the module, ie count the max records of a selection
return '';
}
function process_thisone($module)
{
global $template;
// sav template state
// process
$template->set_filename(array('module' => 'thisone.tpl'));
$template->assign_vars(array(
));
// some stuff
template->assign_block_vars('row', array(
));
// get back the value
$template->assign_var_from_handle('module', '_module');
$res = $template->_tpldata['.'][0]['_module'];
// restore the template state
// return
return $res;
}
function post_process_thisone($module)
{
[../..]some stuff regarding the pagination, the system vars, hidden fields, etc
}
How will this be covered by 2.1 templating system ? I don't think the include feature is a respond to this need, as it sounds rather be a merge of templates files together (if I have correctly got it). The real need is to get back the result of assigning vars to a template, and only of this template, even if the main template has already vars assigned. (note that the need is exactly the same than parsing bbcodes ie in a message, but is solved here by using the templating system than rather writing a new one as it is done for bbcode in phpBB 2.0)