[pmwiki-users] automatic Trail with random back & next

Patrick R. Michaud pmichaud at pobox.com
Sat Jul 26 02:21:34 CDT 2008

On Mon, Jul 21, 2008 at 02:54:53PM +0200, St�phane Heckel wrote:
> Looking for a way to implement an automatic random trail that would look 
> like
> << Title of random page X | Groupname | Title of random page Y >>
> X & Y are 2 pages, selected from "Groupname"
> Each time you refresh the page, X & Y would change, ...
> Is there any cookbook I could look at ?

It can be done very simply with a pagelist template:

  (:template first:)
  << {=$Title} | {$$group} |
  (:template last:)
  {=$Title} >>

  (:pagelist group=Groupname order=random fmt=#randomtrail:)

Of course, the advantage of this approach is that it works
with any pagelist, including trails, categories, etc.  :-)


More information about the pmwiki-users mailing list