]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/inline.pm
inline: Allow MTIME to be used in inlinepage.tmpl.
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index e0f33ef315e8a1539c3e5c4da1bb4fa03d419d65..037c206184a619fddae6058cc19ab112286690b3 100644 (file)
@@ -266,6 +266,9 @@ sub preprocess_inline (@) { #{{{
                my $rootpage;
                if (exists $params{rootpage}) {
                        $rootpage=bestlink($params{page}, $params{rootpage});
+                       if (!length $rootpage) {
+                               $rootpage=$params{rootpage};
+                       }
                }
                else {
                        $rootpage=$params{page};
@@ -313,6 +316,7 @@ 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(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
                                $template->param(first => 1) if $page eq $list[0];
                                $template->param(last => 1) if $page eq $list[$#list];