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.
5 <li> I give pagetitle the full path to a page.
6 <li> I redefine the 'pagetitle'-sub to deal with it.
7 <li> to maintain compatibility for IkiWikis without the meta-plugin, i added a 'basename' to the Original-pagetitle.
11 diff -c /usr/share/perl5/IkiWiki/Render.pm.distrib /usr/share/perl5/IkiWiki/Render.pm
12 *** /usr/share/perl5/IkiWiki/Render.pm.distrib Wed Aug 6 07:34:55 2008
13 --- /usr/share/perl5/IkiWiki/Render.pm Tue Aug 26 23:29:32 2008
17 title => $page eq 'index'
19 ! : pagetitle(basename($page)),
20 wikiname => $config{wikiname},
22 backlinks => $backlinks,
25 title => $page eq 'index'
28 wikiname => $config{wikiname},
30 backlinks => $backlinks,
32 diff -c /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm
33 *** /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib Wed Aug 6 07:34:55 2008
34 --- /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm Tue Aug 26 23:19:43 2008
37 "height_$height" => 1,
40 ! $title=IkiWiki::pagetitle($dir);
45 "height_$height" => 1,
48 ! $title=IkiWiki::pagetitle($path);
53 diff -c /usr/share/perl5/IkiWiki.pm.distrib /usr/share/perl5/IkiWiki.pm
54 *** /usr/share/perl5/IkiWiki.pm.distrib Wed Aug 6 07:48:34 2008
55 --- /usr/share/perl5/IkiWiki.pm Tue Aug 26 23:47:30 2008
62 + $page=basename($page);
65 $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
68 diff -c /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib /usr/share/perl5/IkiWiki/Plugin/meta.pm
69 *** /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib Wed Aug 6 07:34:55 2008
70 --- /usr/share/perl5/IkiWiki/Plugin/meta.pm Tue Aug 26 23:30:58 2008
74 package IkiWiki::Plugin::meta;
77 + no warnings 'redefine';
87 + sub IkiWiki::pagetitle ($;$) {
89 + my $unescaped=shift;
91 + if ($page =~ m#/#) {
93 + $page =~ s#/index$##;
94 + if ($pagestate{"$page/index"}{meta}{title}) {
95 + $page = $pagestate{"$page/index"}{meta}{title};
97 + $page = IkiWiki::basename($page);
102 + $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
105 + $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : "&#$2;"/eg;
111 package IkiWiki::PageSpec;
113 sub match_title ($$;@) {
119 This is actually a duplicate for
120 [[bugs/pagetitle_function_does_not_respect_meta_titles]], where I'm
121 following up a bit. --[[intrigeri]]