Recent Changes - Search:



edit SideBar

Page List Templates

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=#simpleNB

[[#simpleNB]]
[[{=$FullName}]]
[[#simpleNBend]]

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=#titleNB

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

[[#titleNB]]
[[{=$FullName}|+]]
[[#titleNBend]]

fmt=#group

A bullet list of groups.

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

fmt=#include

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

[[#include]]
(:include {=$FullName}:)
[[#includeend]]

[[#forum]]
(:if equal {<$Group}:)
(:table class=forum width="90%" :)
(:cell style="background:#e5e5ff;padding-left:5px" :)'''Topic'''
(:cell style="background:#e5e5ff;padding-left:5px" :)%thd%'''Last Posted''' 
(:cell style="background:#e5e5ff;padding-left:5px" :)%thd%'''By''' (:if:)
(:cellnr style="background:#eeeeff;padding-left:5px" :)[[{=$FullName}|+]] 
(:cell style="background:#eeeeff;padding-left:5px" :){=$LastModified}
(:cell style="background:#eeeeff;padding-left:5px" :)[[~{=$LastModifiedBy}]] 
(:if equal {>$Group}:)
(:tableend:)(:if:)
[[#forumend]]

fmt=#sidebartitles

pagelist of spaced page titles for sidebar, without group heading

[[#sidebartitles]](:if equal {<$Group}:)
>>fplsidebar<<(:if:)
* [[{=$FullName}|{=$Titlespaced}]]
(:if equal {>$Group}:)
>><<(:if:)
[[#sidebartitlesend]]

fmt=#description

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

[[#description]]
*[[{=$FullName}|+]]
->'-''description:'' {=$:Description}-'
->'-''url:'' {=$:URL}-'
[[#descriptionend]]

fmt=#descriptionTXT

List book titles and append the page’s description if it exists (Basic Writing Resources Texts.

[[#descriptionTXT]]
*[[{=$FullName}|+]]
->'-''description:'' {=$:Description}-'
[[#descriptionTXTend]]

fmt=#oneline

compact pagelist in one line.

[[#oneline]](:if ! equal {<$Group} {=$Group}:)
'''[[{=$Group}]] /''' \
(:if true:) | [[{=$FullName}|+]] \
[[#onelineend]]
(:pagelist fmt=PagelistTemplateSamples#oneline group=Main count=4:)

fmt=#oneline

compact pagelist in one line.

[[#onelineNG]]
| [[{=$FullName}|+]] \
[[#onelineNGend]]
Edit - History - Print - Recent Changes - Search
Page last modified on May 26, 2007, at 11:34 AM