Pagelist Random Image
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
- Install Cookbook:ThumbList
- 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:) |
(:thumblist PITS.00677 px=128 link=2 order=random count=1:) (:thumblist Test.Comments px=128 link=2 order=random count=1:) (:thumblist PITS.00579 px=128 link=2 order=random count=1:) (:thumblist Test.Notebook-NT-Skin px=128 link=2 order=random count=1:) (:thumblist Profiles.OtherMike px=128 link=2 order=random count=1:) (:thumblist PmWikiUk.Search px=128 link=2 order=random count=1:) (:thumblist Skins.Minimous px=128 link=2 order=random count=1:) (:thumblist Category.FileManagement 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
See Also
- Pagelist Auth List Short Display, in brief format, the permissions settings for pages that have permissions set.
- PagelistByCategory List pages by Category
- PagelistCalendar Use PageTextVariables and ftime markup expression to create a calendar where each event has its own page.
- PagelistCount Get pagelist to return a count of pages (deprecated)
- PageListExtensions Many Pagelist Enhancements
- PageListMultiTargets Enable multiple pages and wildcards in PageList
- PagelistNotes Notes on page lists
- PageListPlus Extend pagelist with various capabilities
- Pagelist Random Image Select an image randomly from all pages with images and display
- Pagelist Recent Changes A recent changes page created using Page lists
- Pagelist Site Map Create a sitemap using the page list directive
- PageListTemplates Recipe deprecated, see PmWiki.PageLists
- Pagelist Template Samples Custom templates for pagelists formats
- PageListWikiTrail Enable a WikiTrails markup to use a (:pagelist ... :) directive
Contributors
Comments
See discussion at PagelistRandomImage-Talk
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.