1
0

Allow plugins to set different entry templates for the editing form.

This can allow a plugin to offer dedicated entry templates depending on the selected category, based on the user or other cool stuff.
This commit is contained in:
Garvin Hicking
2007-05-30 20:18:33 +00:00
parent 40b8b6ced4
commit 665e895dc0

View File

@ -167,10 +167,13 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
'body' => 'serendipity[body]',
'extended' => 'serendipity[extended]'
);
$template_vars['entry_template'] = serendipity_getTemplateFile('admin/entries.tpl', 'serendipityPath');
$serendipity['smarty']->register_modifier('emit_htmlarea_code', 'serendipity_emit_htmlarea_code');
$serendipity['smarty']->assign('admin_view', 'entryform');
serendipity_plugin_api::hook_event('backend_entryform_smarty', $template_vars);
$serendipity['smarty']->assign_by_ref('entry_vars', $template_vars);
$serendipity['smarty']->display(serendipity_getTemplateFile('admin/entries.tpl', 'serendipityPath'));
$serendipity['smarty']->display($template_vars['entry_template']);
return true;
}