]> sipb.mit.edu Git - ikiwiki.git/commitdiff
rootpage is not a pagespec
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 14 Sep 2008 17:50:34 +0000 (13:50 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 14 Sep 2008 17:50:34 +0000 (13:50 -0400)
So ./posts won't be interpreted right. Just "posts" should do, I think.

IkiWiki/Plugin/inline.pm
doc/examples/blog/index.mdwn

index 02c9cbdc0af53b87c7877cf0a7afdab87c7f3bda..8efef3fc85ccc7883172f185b67dc57ff86ec19c 100644 (file)
@@ -263,8 +263,14 @@ sub preprocess_inline (@) { #{{{
                # Add a blog post form, with feed buttons.
                my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
                $formtemplate->param(cgiurl => $config{cgiurl});
                # Add a blog post form, with feed buttons.
                my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
                $formtemplate->param(cgiurl => $config{cgiurl});
-               $formtemplate->param(rootpage => 
-                       exists $params{rootpage} ? $params{rootpage} : $params{page});
+               my $rootpage;
+               if (exists $params{rootpage}) {
+                       $rootpage=bestlink($params{page}, $params{rootpage});
+               }
+               else {
+                       $rootpage=$params{page};
+               }
+               $formtemplate->param(rootpage => $rootpage);
                $formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
                $formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
                if (exists $params{postformtext}) {
                $formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
                $formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
                if (exists $params{postformtext}) {
index 3b2d46027604be70d937e71f6deff8d7fca47b7c..6daf9db509cede87f753f243b9f73908ce577848 100644 (file)
@@ -7,7 +7,7 @@ browse the tag cloud on the right. An archive of all [[posts]] is also
 available.
 
 [[!inline pages="./posts/* and !*/Discussion" show="10"
 available.
 
 [[!inline pages="./posts/* and !*/Discussion" show="10"
-actions=yes rootpage="./posts"]]
+actions=yes rootpage="posts"]]
 
 ----
 
 
 ----