aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/Add_basename_in_edittemplate.mdwn
diff options
context:
space:
mode:
authorhttps://www.google.com/accounts/o8/id?id=AItOawkxjEWFrqK-cq0Ms5LmExRB4VDjOcddAJs <Vegard@web>2012-05-31 08:09:24 -0400
committeradmin <admin@branchable.com>2012-05-31 08:09:24 -0400
commit8aaf5790b8e9759c61e15e1192855cae6811f3a1 (patch)
tree352211be92ba4a8d4929ee9e2ca5de2b355660c7 /doc/todo/Add_basename_in_edittemplate.mdwn
parent8eb8755aebbe12825de076b6eac9639805d79354 (diff)
downloadikiwiki-8aaf5790b8e9759c61e15e1192855cae6811f3a1.tar
ikiwiki-8aaf5790b8e9759c61e15e1192855cae6811f3a1.tar.gz
Diffstat (limited to 'doc/todo/Add_basename_in_edittemplate.mdwn')
-rw-r--r--doc/todo/Add_basename_in_edittemplate.mdwn8
1 files changed, 8 insertions, 0 deletions
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?