]> sipb.mit.edu Git - ikiwiki.git/commitdiff
(no commit message)
authorhttps://www.google.com/accounts/o8/id?id=AItOawkxjEWFrqK-cq0Ms5LmExRB4VDjOcddAJs <Vegard@web>
Thu, 31 May 2012 12:09:24 +0000 (08:09 -0400)
committeradmin <admin@branchable.com>
Thu, 31 May 2012 12:09:24 +0000 (08:09 -0400)
doc/todo/Add_basename_in_edittemplate.mdwn [new file with mode: 0644]

diff --git a/doc/todo/Add_basename_in_edittemplate.mdwn b/doc/todo/Add_basename_in_edittemplate.mdwn
new file mode 100644 (file)
index 0000000..6f5b056
--- /dev/null
@@ -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?