SimpleSiteMap
Questions answered by this recipe
How do I build an appealing site map using only core PmWiki features?
Description
This method of creating a sitemap requires the following:
- Add a new page template in
Site.LocalTemplates
- Create the sitemap page and populate it with a pagelist
Installation
Because this recipe uses core PmWiki functions there is nothing to install.
Configuration
The Pagelist Template
Edit the wiki page [[Site.LocalTemplates]]
(in your own wiki), and add the following template:
!!fmt=#simplesitemap >>comment<< [[#simplesitemap]] (:template first:) (:table style="border:1px solid #b3b3b3" class=forum :) (:cell style="background:#f0f0f0;max-width:40%;border-bottom:1px solid #b3b3b3;padding-left:5px" :)Topic (:cell style="background:#f0f0f0;border-bottom:1px solid #b3b3b3;padding-left:5px" :)%thd%Summary (:template each:) (:cellnr style="background:#fafafa;border-bottom:1px solid #b3b3b3;padding-left:5px" :)[[{=$FullName}|+]] (:cell style="background:#fafafa;border-bottom:1px solid #b3b3b3;padding-left:5px" :){=$:Summary} (:template last:) (:tableend:) [[#simplesitemapend]] >><< ---- (:pagelist group=PmWiki name=-*-Talk fmt=#simplesitemap list=normal count=9:) | ||||||||||||||||||||
fmt=#simplesitemap
|
The pagelist
Choose a page to hold the sitemap, I chose Main.SiteMap. Add the following pagelist to the sitemap page for each group that you want to appear in the sitemap:
'''Gallery''': (:pagelist group=Gallery list=normal name=-Wedding fmt=#simplesitemap:) '''Mobile''': (:pagelist group=Mobile list=normal name=-Tablet fmt=#simplesitemap:)
The above example would show all pages in the Gallery and Mobile groups except Gallery.Wedding and Mobile.Tablet. Using this pagelist allows the user to exclude specified pages.
Usage
I have added styling to the pagelist template so that it can be easily styled to blend into any skin.
Notes
Change log / Release notes
2012-09-08 - ver. 1.0 - initial release 2016-06-01 - ver. 1.1 - use template first etc
See also
- Pagelist Site Map Create a sitemap using the page list directive
- Sitemapper Adds a dynamically generated sitemap to PmWiki.
- SiteMapsWithOptions Standard Site Map for websites
- PageLists Searching and listing pages by multiple criteria with templated output
Contributors
Comments
See discussion at SimpleSiteMap-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.