Summary: Display a random image using the
page list directive
Version: 0.1
Prerequisites: Pmwiki version 2.2
Status: Production
Maintainer: Simon
Questions answered by this recipe
How do I display a random image from those uploaded to the wiki?
Description
Use the following page list template to create a sitemap.
Implementation
Add the following to your Site.LocalTemplates.
#randomimage
display a random image
>>comment<<
[[#randomimage]]
(:template default order=random count=1 if="attachments" list=normal:)
(:template each:)
(:thumblist {=$FullName} px={$$px} link=2 order=random count=1:)
[[#randomimageend]]
>><<
(:pagelist fmt=#randomimage list=normal count=8 px=128:)
|
(:template default order=random count=1 if="attachments" list=normal:)
(:template each:)
(:thumblist {=$FullName} px={$$px} link=2 order=random count=1:)
(:thumblist Christian.WinXPTips px=128 link=2 order=random count=1:)
(:thumblist PITS.00201 px=128 link=2 order=random count=1:)
(:thumblist PmCal.20071120 px=128 link=2 order=random count=1:)
(:thumblist Cjc.20120408 px=128 link=2 order=random count=1:)
(:thumblist GoogleMapAPI.ProgressNotes-2006-12-31 px=128 link=2 order=random count=1:)
(:thumblist TestDescription.TestDescriptionFmt px=128 link=2 order=random count=1:)
(:thumblist Test.HolaMundo px=128 link=2 order=random count=1:)
(:thumblist PmWikiDe.BlockMarkup px=128 link=2 order=random count=1:)
|
In a page copy the above page list directive modifying it as necessary, eh
(:pagelist fmt=#randomimage list=normal group=Photographs count=1 px=256:)
Release Notes
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
See Also
Contributors
Comments
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.