X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e22b18aabcb46e3c0eafeb466b51bb3eb18cf1e1..950a45ec7709203716db3df0dea29fb0f236b773:/IkiWiki/Plugin/edittemplate.pm diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 576c94be4..061242fd8 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -107,9 +107,11 @@ sub formbuilder (@) { my $template=$pagestate{$registering_page}{edittemplate}{$pagespec}; $form->field(name => "editcontent", value => filltemplate($template, $page)); - $form->field(name => "type", - value => pagetype($pagesources{$template})) + my $type=pagetype($pagesources{$template}) if $pagesources{$template}; + $form->field(name => "type", + value => $type) + if defined $type; return; } }