Night Owl

This page contains "templates" for PmWiki's (:pagelist:) directive.

Brief Syntax Explanation:

See also: Pagelist Explained, Page Variables, Conditional Markup, Cookbook:PagelistTemplateSamples

Use with page variables:

   =   current item
   <   previous item
   >   next item

Conditionals used to structure pagelist output:

   (:if equal {<$Group}:)               At beginning of list
   (:if equal {>$Group}:)               At end of list
   (:if ! equal {=$Group} {<$Group}:)   First item in group
   (:if ! equal {=$Group} {>$Group}:)   Last item in group

fmt=#default

The default template for pagelists when fmt= isn't specified.

[[#default]]
(:if ! equal {=$Group} {<$Group}:)

:[[{=$Group}]] /:
(:if:)
: :[[{=$Group}/{=$Name}]]
[[#defaultend]]

fmt=#bygroup

Display pages by group/name.

[[#bygroup]]
(:if ! equal {=$Group} {<$Group}:)

:[[{=$Group}]] /:
(:if:)
: :[[{=$Group}/{=$Name}]]
[[#bygroupend]]

fmt=#simple

A simple bullet list of page names.

[[#simple]]
* [[{=$FullName}]]
[[#simpleend]]

fmt=#title

A simple bullet list of page titles. Use order=title to have them sorted by title (the default sort is by name).

[[#title]]
* [[{=$FullName}|+]]
[[#titleend]]

fmt=#group

A bullet list of groups.

[[#group]]
(:if ! equal {=$Group} {<$Group}:)
* [[{=$Group}]]
[[#groupend]]

fmt=#include

This format includes whole pages, with titles as links to the pages, seperated by a horizontal rule underneath each page's content. An edit link appears if authorised as editor.

[[#include]]
(:if auth edit:)
%rfloat%[[{=$FullName}?action=edit|[-edit-]]](:if:)
!!![[{=$FullName}|{=$Title}]]
(:include {=$FullName}:)
----
(:if equal {>$Group}:)
(:title {$Title}:)(:if:)
[[#includeend]]

Note: {$Title} is added to the end to preserve the page title, so it will not be replaced by any title given with the included pages. PmWiki may change this in future to preserve titles automatically. So this is a bit of a hack here to overcome a present limitation in PmWiki.


fmt=#blogtitles

Pagelist of spaced blog titles with date stripped for sidebar.

[[#blogtitles]](:if equal {<$Group}:)
>>blogtitles<<(:if:)
* [[{=$Namespaced}]]
(:if equal {>$Group}:)
>><<(:if:)
[[#blogtitlesend]]