add ISPAGE variable to page.tmpl
authorJoey Hess <joey@kitenet.net>
Wed, 5 May 2010 22:12:27 +0000 (18:12 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 5 May 2010 22:17:25 +0000 (18:17 -0400)
Plugins will also be able to use this to tell if the template
is being used to generate a wiki page, when misctemplate starts
also using page.tmpl.

IkiWiki/Render.pm

index e5ba0079b7b74706ebc1723a9206de3de3770ba1..fc5d3953d0df8697fcd122bce9a0e6445714cb2f 100644 (file)
@@ -138,6 +138,7 @@ sub genpage ($$) {
                title => $page eq 'index' 
                        ? $config{wikiname} 
                        : pagetitle(basename($page)),
+               ispage => 1,
                wikiname => $config{wikiname},
                content => $content,
                backlinks => $backlinks,
@@ -145,6 +146,7 @@ sub genpage ($$) {
                mtime => displaytime($pagemtime{$page}),
                ctime => displaytime($pagectime{$page}, undef, 1),
                baseurl => baseurl($page),
+               have_footer => 1,
                html5 => $config{html5},
        );