Also kann man da Code schreiben wie
Code: Alles auswählen
// generate html output
cInclude('classes', 'class.template.php');
if (!is_object($itpl))
{
$itpl = new Template;
}
$itpl->reset();
$itpl->set('d', '{CAPTION10}', mi18n("Type name of project"));
$itpl->set('d', '{CAPTION20}', mi18n("Project Name"));
$itpl->set('d', '{PROJNAME_DEFAULT}', mi18n("Internal ID"));
$itpl->set('d', '{CAPTION30}', mi18n("PROJECT NAME"));
$itpl->set('d', '{PROJID_DEFAULT}', mi18n("INTERNAL ID, example: R12/04"));
$itpl->set('d', '{CAPTION40}', mi18n("Mark the items that should be shown on the final web page:"));
$itpl->next();
$itemplate = 'somefile_body.html';
$itpl->generate('templates/' . $itemplate);
Da das ganze im Wesentlichen innerhalb eines eval() Statements in der Datei include.tplcfg_edit_form.php ausgeführt wird, könnte es schwierig sein. Auch gibt es im umgebenden Scope der eval() Funktion bereits ein $tpl objekt, zwei Zeilen weiter:
Code: Alles auswählen
eval($CiCMS_VALUE." \r\n ".$input);
$modulecode = ob_get_contents();
$tpl->set('d', 'MODULECAPTION', $modulecaption);