Recent Changes - Search:

Site.PageListTemplates History

Hide minor edits - Show changes to output

Changed lines 1-16 from:
This page contains "templates" for PmWiki's [@(:pagelist:)@] directive.

!!!Brief Syntax Explanation:

See also:
[[Cookbook:PagelistExplained|Pagelist Explained]], [[PmWiki/Page Variables]], [[PmWiki/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
to:
(:Summary:[[(PmWiki/PageList)Templates]] for PmWiki's [[PmWiki/Page lists]] directive:)
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.
Added lines 4-10:
!!!Page list template documentation
* [[PmWiki/Page Lists]] - {PmWiki/PageLists$:Summary}
* [[PmWiki/Page List Templates]] - {PmWiki/PageListTemplates$:Summary}
* [[PmWiki/Page Variables]] - {PmWiki/PageVariables$:Summary}
* [[PmWiki:PageTextVariables|Page Text Variables]] - {PmWiki/PageTextVariables$:Summary}
* [[PmWiki/Conditional Markup]] - {PmWiki/PageLists$:Summary}
* [[Cookbook:Pagelist Template Samples]] - {Cookbook/PagelistTemplateSamples$:Summary}
Changed line 15 from:
The default template for pagelists when [@fmt=@] isn't specified.
to:
The default template for pagelists when [@fmt=@] isn't specified (and note that on the PmWiki.org wiki, this template is over-ridden by the one on the [[Site.LocalTemplates]] page).
Changed lines 17-18 from:
[@
to:
(:markup class="horiz":)
(:if false:)
Changed line 20 from:
(:if ! equal {=$Group} {<$Group}:)
to:
(:template first {=$Group}:)
Changed lines 22-24 from:
:[[{=$Group}]] /:
(:if:)
: :[[{=$Group}/{=$Name}|$Titlespaced]]
to:
:[[{=$Group}/]] /:
(:template each:)
: :[[{=$Group}/{=$Name}]]
Changed lines 26-29 from:
@]
to:
(:ifend:)

(:pagelist group={$Group} fmt=#default count=7:)
(:markupend:)
Changed lines 36-37 from:
[@
to:
(:markup class="horiz":)
(:if false:)
Changed line 39 from:
(:if ! equal {=$Group} {<$Group}:)
to:
(:template first {=$Group}:)
Changed lines 41-42 from:
:[[{=$Group}]] /:
(:if:)
to:
:[[{=$Group}/]] /:
(:template each:)
Changed lines 45-48 from:
@]
to:
(:ifend:)

(:pagelist group={$Group} fmt=#bygroup count=7:)
(:markupend:)
Changed lines 55-56 from:
[@
to:
(:markup class="horiz":)
(:if false:)
Changed lines 60-63 from:
@]
to:
(:ifend:)

(:pagelist group={$Group} fmt=#simple count=5:)
(:markupend:)
Changed line 68 from:
A simple bullet list of page titles.  Use [@order=title@] to have them sorted by title (the default sort is by name).
to:
A simple bullet list of page titles.
Changed lines 70-71 from:
[@
to:
(:markup class="horiz":)
(:if false:)
Added line 73:
(:template defaults order=title:)
Changed lines 76-95 from:
@]
to:
(:ifend:)

(:pagelist group={$Group} fmt=#title count=5:)
(:markupend:)

----
!!!fmt=#titlespaced

Outputs wiki page titles with spaces between the words in the title.

(:markup class="horiz":)
(:if false:)
[[#titlespaced
]]
(:template defaults order=title:)
* [[{=$FullName}|{=$Titlespaced}]]
[[#titlespacedend]]
(:ifend:)

(:pagelist group={$Group} fmt=#titlespaced count=5:)
(:markupend:)
Changed lines 104-105 from:
(:if ! equal {=$Group} {<$Group}:)
* [[{=$Group}
]]
to:
(:template first {=$Group}:)
* [[
{=$Group}/]]
Deleted line 108:
Changed line 116 from:
(:include {=$FullName}:)
to:
(:include {=$FullName} self=0:)
Added lines 119-185:


----
!!!fmt=#includefaq

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!)

[@
[[#includefaq]]
----
'''Section: [[{=$FullName}#faq|+]]'''

'''Questions:'''
>>faq<<
(:include {=$FullName}#faq#faqend self=0:)
>><<
[[#includefaqend]]
@]

----
!!!fmt=#description

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

(:markup class="horiz":)
(:if false:)
[[#description]]
*[[{=$FullName}|+]]
(:if ! equal {=$Description} '':)
->'-''description:'' {=$Description}-'
(:ifend:)
[[#descriptionend]]
(:ifend:)

(:pagelist group={$Group} fmt=#description count=7:)
(:markupend:)

----
!!!fmt=#simplename

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

(:markup class="horiz":)
(:if false:)
[[#simplename]]
* [[({=$Group}/){=$Name}]]
[[#simplenameend]]
(:ifend:)

(:pagelist group={$Group} fmt=#simplename count=5:)
(:markupend:)

----
!!!fmt=#simplenamespaced

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

(:markup class="horiz":)
(:if false:)
[[#simplenamespaced]]
* [[({=$Group}/){=$Namespaced}]]
[[#simplenamespacedend]]
(:ifend:)

(:pagelist group={$Group} fmt=#simplenamespaced count=5:)
(:markupend:)
Changed line 30 from:
: :[[{=$Group}/{=$Name}]]
to:
: :[[{=$Group}/{=$Name}|$Titlespaced]]
Edit - History - Print - Recent Changes - Search
Page last modified on June 02, 2007, at 07:14 AM