From: Joey Hess Date: Sat, 2 Jun 2012 01:32:51 +0000 (-0400) Subject: Merge branch 'master' of ssh://git.ikiwiki.info X-Git-Tag: 3.20120629~51 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/aa9c867061dd11022853aaef711452aee80905f5?hp=73136f100f627e5982e06a2841e8cd086c38ef7f Merge branch 'master' of ssh://git.ikiwiki.info --- diff --git a/doc/todo/Add_basename_in_edittemplate.mdwn b/doc/todo/Add_basename_in_edittemplate.mdwn new file mode 100644 index 000000000..6f5b0569f --- /dev/null +++ b/doc/todo/Add_basename_in_edittemplate.mdwn @@ -0,0 +1,8 @@ +I wanted to produce an external link from a ikiwiki Subpage based on +the *basename* of the Subpage. So I added the following code to the +edittemplate plugin: + + my ($basename) = $page =~ m!.*/(.*)!; + $template->param(basename => $basename || $page); + +Is there any other way I could have achieved this?