Deprecated: Assigning the return value of new by reference is deprecated in /u/deptinfo/dalle/www/wiki2/cookbook/sourceblock.php on line 153

Warning: Cannot modify header information - headers already sent by (output started at /u/deptinfo/dalle/www/wiki2/cookbook/sourceblock.php:153) in /u/deptinfo/dalle/www/wiki2/pmwiki.php on line 885
Olivier Dalle's Corner: Site / Page List Templates
Olivier Dalle's

This page contains “templates” for PmWiki’s (:pagelist:) directive. The Site.LocalTemplates? page can be created and used to store pagelist templates that are local to a site.

Brief Syntax Explanation:

See also: PageLists, Page Variables, Conditional Markup, and 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


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

(:if ! equal {=$Group} {<$Group}:)

:[[{=$Group}/]] /:
: :[[{=$Group}/{=$Name}]]


Display pages by group/name.

(:if ! equal {=$Group} {<$Group}:)

:[[{=$Group}/]] /:
: :[[{=$Group}/{=$Name}]]


A simple bullet list of page names.

* [[{=$FullName}]]


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

* [[{=$FullName}|+]]


A bullet list of groups.

(:if ! equal {=$Group} {<$Group}:)
* [[{=$Group}/]]


Concatenate the text of pages in the list. (Note, this can be an expensive operation!)

(:include {=$FullName} self=0:)


Include just the #faq sections from pages in the list. (This can also be expensive, especially if the list includes pages that don’t have the [[#faq]] anchor!)

(:include {=$FullName}#faq#faqend self=0:)


List pages and append the page’s description if it exists.

(:if ! equal {=$Description} '':)
->'-''description:'' {=$Description}-'


Simple bullet list of page names, without the Group name.

* [[({=$Group}/){=$Name}]]