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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user