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 Cookbook.MathJax-Users px=128 link=2 order=random count=1:) (:thumblist PITS.01263 px=128 link=2 order=random count=1:) (:thumblist PmWikiRu.SiteSearh px=128 link=2 order=random count=1:) (:thumblist Cookbook.SimplemachinesUserSystemIntegration px=128 link=2 order=random count=1:) (:thumblist Skins.Grease-Talk px=128 link=2 order=random count=1:) (:thumblist Test.PageListLink px=128 link=2 order=random count=1:) (:thumblist PmWikiRu.DocumentationIndex px=128 link=2 order=random count=1:) (:thumblist Cjc.20091015 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.