[pmwiki-users] Default max count for (:pagelist:)
christian.ridderstrom at gmail.com
christian.ridderstrom at gmail.com
Sun May 28 06:18:57 CDT 2006
I would like to suggest that we introduce a default max count for
(:pagelist:). The reason is that I was just debugging a problem where some
pagelist-directive on a page returned way to many pages. If I'd known
which directive it was, I could of course have added 'count=...', but as I
didn't it was quite tedious.
Today, an unsuspecting author might write "(:pagelist:)" on a page, and
end up totally sinking the page. For instance, this page
http://pmwiki.org/wiki/Test/PagewithOnlyPagelist
takes quite a while to show so you end up thinking something is wrong.
(And on my old laptop, the browser freezes for a while due to the size of
the page).
So primarily because it is so easy to by mistake generate an exceedingly
long list of pages, I think it should be possible to have a default
maximum count for pagelist. This can be done in several ways of course:
* Introduce a separate variable, $PagelistMaxCount, that controls
the maximum number of entries pagelist may ever generate. This would be
regardless of what 'count=n' says.
* Introduce a separate variable, $PagelistDefaultMaxCount, that is
basically equivalent to a default value for 'count=n'. The author
can then override this with 'count=100000' if he wants that many pages.
Then there's the question of what to do when pagelist wants to list more
pages than it can. I think that if it's a default limit that is active,
then pagelist should probably output a special message at the end of the
list. It could say something like:
More pages match this list criteria, see [[PmWiki/PageLists#more]]
for details.
On the other hand, if the directive contains an explicit 'count=n', I'm
less inclined to like that such a message is shown. So perhaps pagelist
should have a flag that controls if the "more"-message is shown or not.
What do you think?
/C
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list