From 27a80dc40aa4cad93576a35d0af1f6c117ffcb68 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 7 Jan 2011 09:29:13 +0100 Subject: inline: allow assigning an id to postform/feedlink This allows per-form/feedlink group customization without having to resort to counting. (cherry picked from commit b134feb0dc2d9a8ff7ae447537fa8bc02811aabd) --- IkiWiki/Plugin/inline.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 44e38436c..ffdf397f1 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -329,6 +329,10 @@ sub preprocess_inline (@) { $formtemplate->param(postformtext => gettext("Add a new post titled:")); } + if (exists $params{id}) { + $formtemplate->param(postformid => + $params{id}); + } $ret.=$formtemplate->output; # The post form includes the feed buttons, so @@ -346,6 +350,9 @@ sub preprocess_inline (@) { $linktemplate->param(atomurl => $atomurl); $linktemplate->param(atomdesc => $atomdesc); } + if (exists $params{id}) { + $linktemplate->param(id => $params{id}); + } $ret.=$linktemplate->output; } -- cgit v1.2.3