summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-01-28 21:22:04 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-28 21:22:04 -0500
commit3436fed08169893953fef6858f7645437f39d1b0 (patch)
tree01443c2e1242a0bbe2c17ce270418bf5fbd329d5 /IkiWiki/Plugin
parent4f269010b4a2b5ae9f2a3e342e3ec15ea72c61bb (diff)
* inline: The template can check for FIRST and LAST, which will be
set for the first and last inlined page. Useful for templates that build tables and the like.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 59eabb606..796cf2cf6 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -231,6 +231,8 @@ sub preprocess_inline (@) { #{{{
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
$template->param(title => pagetitle(basename($page)));
$template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));
+ $template->param(first => 1) if $page eq $list[0];
+ $template->param(last => 1) if $page eq $list[$#list];
if ($actions) {
my $file = $pagesources{$page};