more links

master
joey 2006-07-29 20:14:07 +00:00
parent 498dba8b70
commit 299bb8bef3
2 changed files with 10 additions and 2 deletions

View File

@ -42,8 +42,14 @@ sub preprocess (@) { #{{{
}
if ($style eq 'table') {
return "<table class='pageStats'>\n".join("\n", map { "<tr><td>$_</td><td>".$counts{$_}."</td></tr>" }
sort { $counts{$b} <=> $counts{$a} } keys %counts)."\n</table>\n" ;
return "<table class='pageStats'>\n".
join("\n", map {
"<tr><td>".
IkiWiki::htmllink($params{page}, $params{destpage}, $_, 1).
"</td><td>".$counts{$_}."</td></tr>"
}
sort { $counts{$b} <=> $counts{$a} } keys %counts).
"\n</table>\n" ;
} else {
# In case of misspelling, default to a page cloud

View File

@ -13,3 +13,5 @@ And here's how to create a table of all the pages on the wiki:
This plugin is included in ikiwiki, but is not enabled by default. If it is
enabled, here's a link cloud for this entire wiki:
[[pagestats ]]
And here's a table:
[[pagestats style="table"]]