1 It is possible to set a Page-Title in the meta-plugin, but that one isn't
2 reused in parentlinks. This patch may fix it.
4 **This patch may introduce some bugs, i need to investigate**
8 <li> I give pagetitle the full path to a page.
9 <li> I redefine the 'pagetitle'-sub to deal with it.
10 <li> to maintain compatibility for IkiWikis without the meta-plugin, i added a 'basename' to the Original-pagetitle.
14 diff -c /usr/share/perl5/IkiWiki/Render.pm.distrib /usr/share/perl5/IkiWiki/Render.pm
15 *** /usr/share/perl5/IkiWiki/Render.pm.distrib Wed Aug 6 07:34:55 2008
16 --- /usr/share/perl5/IkiWiki/Render.pm Tue Aug 26 23:29:32 2008
20 title => $page eq 'index'
22 ! : pagetitle(basename($page)),
23 wikiname => $config{wikiname},
25 backlinks => $backlinks,
28 title => $page eq 'index'
31 wikiname => $config{wikiname},
33 backlinks => $backlinks,
35 diff -c /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm
36 *** /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib Wed Aug 6 07:34:55 2008
37 --- /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm Tue Aug 26 23:19:43 2008
40 "height_$height" => 1,
43 ! $title=IkiWiki::pagetitle($dir);
48 "height_$height" => 1,
51 ! $title=IkiWiki::pagetitle($path);
56 diff -c /usr/share/perl5/IkiWiki.pm.distrib /usr/share/perl5/IkiWiki.pm
57 *** /usr/share/perl5/IkiWiki.pm.distrib Wed Aug 6 07:48:34 2008
58 --- /usr/share/perl5/IkiWiki.pm Tue Aug 26 23:47:30 2008
65 + $page=basename($page);
68 $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
71 diff -c /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib /usr/share/perl5/IkiWiki/Plugin/meta.pm
72 *** /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib Wed Aug 6 07:34:55 2008
73 --- /usr/share/perl5/IkiWiki/Plugin/meta.pm Tue Aug 26 23:30:58 2008
77 package IkiWiki::Plugin::meta;
80 + no warnings 'redefine';
90 + sub IkiWiki::pagetitle ($;$) { #{{{
92 + my $unescaped=shift;
94 + if ($page =~ m#/#) {
96 + $page =~ s#/index$##;
97 + if ($pagestate{"$page/index"}{meta}{title}) {
98 + $page = $pagestate{"$page/index"}{meta}{title};
100 + $page = IkiWiki::basename($page);
105 + $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
108 + $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : "&#$2;"/eg;
114 package IkiWiki::PageSpec;
116 sub match_title ($$;@) { #{{{