pagestats: rename disp to show, and document it

master
Simon McVittie 2014-09-14 15:57:09 +01:00
parent 89492a62a7
commit e3e6ca2777
2 changed files with 9 additions and 3 deletions

View File

@ -34,10 +34,10 @@ sub getsetup () {
sub linktext ($%) {
# Return the text of the link to a tag, depending on option linktext.
my ($page, %params) = @_;
if (exists $params{disp} &&
if (exists $params{show} &&
exists $pagestate{$page} &&
exists $pagestate{$page}{meta}{$params{disp}}) {
return $pagestate{$page}{meta}{$params{disp}};
exists $pagestate{$page}{meta}{$params{show}}) {
return $pagestate{$page}{meta}{$params{show}};
}
else {
return undef;

View File

@ -40,4 +40,10 @@ that name still works, if its value is numeric.
The optional `class` parameter can be used to control the class
of the generated tag cloud `div` or page stats `table`.
By default, the names of pages are shown. The `show` parameter
can be used (with a non-numeric value) to show the titles or descriptions
of pages instead (as set by the [[meta]] directive). For example:
\[[!pagestats pages="tags/*" show="title"]]
[[!meta robots="noindex, follow"]]