[pmwiki-users] Random page generator?

StefCT stefct4 at gmail.com
Sun Oct 25 16:49:56 CDT 2015


On 10/25/2015 10:30 PM, StefCT wrote:

> 
> On 10/25/2015 10:14 PM, Donald Z. Osborn wrote:
>> Greeetings, Is there a way to generate (call up and open) random pages in
>> the same way MediaWiki does?
> 
> How about
> 
> (:pagelist group=PmWiki order=random count=1 fmt=#redirectto list=normal:)
> 
> (:if false:)
> [[#redirectto]]
> (:redirect {=$FullName}:)
> [[#redirecttoend]]
> (:ifend:)


Actually, there is a solution maybe even easier than my first
suggestion... You could also skip the redirect and try:

(:pagelist group=PmWiki order=random count=1 fmt=#randomPage list=normal:)

(:if false:)
[[#randomPage]]
[[{=$FullName}|Show random page]]
[[#randomPageend]]
(:ifend:)

This markup will display a link "Show random page". This link will lead
to a different page from the group "PmWiki" each time you reload the
page containing the link.

Kind regards,

StefCT






More information about the pmwiki-users mailing list