]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
wishlist
[ikiwiki.git] / doc / todo / turn_edittemplate_verbosity_off_by_default.mdwn
1 `edittemplate` replaces its directive with a note like "edittemplate person
2 registered for people/*". It would be nice if this were dependent on
3 a `verbose` parameter and default to off. I don't see the value in it, and by
4 disabling the output, I can keep template registration as close as possible to
5 the action as needed.
6
7 I think this (untested) patch might just do the trick:
8
9     --- a/IkiWiki/Plugin/edittemplate.pm
10     +++ b/IkiWiki/Plugin/edittemplate.pm
11     @@ -46,8 +46,13 @@ sub preprocess (@) { #{{{
12
13       $pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
14
15     -       return sprintf(gettext("edittemplate %s registered for %s"),
16     -               $params{template}, $params{match});
17     +       if (yesno($params{verbose})) {
18     +               return sprintf(gettext("edittemplate %s registered for %s"),
19     +                       $params{template}, $params{match});
20     +       }
21     +       else {
22     +               return '';
23     +       }
24     } # }}}
25
26     sub formbuilder (@) { #{{{
27
28 --[[madduck]]
29
30 [[tags wishlist patch]]