* inline: The template can check for FIRST and LAST, which will be
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 29 Jan 2008 02:22:04 +0000 (21:22 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 29 Jan 2008 02:22:04 +0000 (21:22 -0500)
    set for the first and last inlined page. Useful for templates that build
    tables and the like.

IkiWiki/Plugin/inline.pm
debian/changelog

index 59eabb606e9967a0a3fb58bc5f0f338a3339f405..796cf2cf6eb794b3ce59436d351987c3a595a672 100644 (file)
@@ -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};
index 50196b0775eae172cafbf5519293483b0c24c43a..6af99590de7f7986a8a140055637771c8f342ea8 100644 (file)
@@ -15,6 +15,11 @@ ikiwiki (2.21) UNRELEASED; urgency=low
   * Add trailing comma to commented-out umask in sample ikiwiki.setup, so
     that uncommenting it does not break the setup file.
 
+  [ Joey Hess ]
+  * 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.
+
  -- Joey Hess <joeyh@debian.org>  Fri, 11 Jan 2008 15:09:37 -0500
 
 ikiwiki (2.20) unstable; urgency=low