PagelistSortVariable

Making pagelists more useful
Requirements, be able to test in a pagelist a change in the order of something other than the pagename.

For example, say I have a number of pages with page text variables, and I wish to list those pages grouped by page text value grouping, eg

>>comment<<
[[#PagelistSortVariableORIGINAL]]
(:template default group=Test $:Maintainer=- order=$:Maintainer,name:)
(:template first {=$:Maintainer} :)
!! Maintained by {=$:Maintainer}
(:template each:)
* [[{=$FullName}]]
[[#PagelistSortVariableEndORIGINAL]]
>><<

(:template default group=Test $:Maintainer=- order=$:Maintainer,name:) (:template first {=$:Maintainer} :)

Maintained by {=$:Maintainer}

(:template each:)

>>comment<<
[[#PagelistSortVariable]]
(:template default group=Test $:Maintainer=?* order=$:Maintainer,$Name:)
(:template first {=$:Maintainer} :)
!! Maintained by {=$:Maintainer}
(:template each:)
* [[{=$FullName}]] by [-({=$:Maintainer})-]
[[#PagelistSortVariableEnd]]
>><<

(:template default group=Test $:Maintainer=?* order=$:Maintainer,$Name:) (:template first {=$:Maintainer} :)

Maintained by {=$:Maintainer}

(:template each:)

  • note default is to select pages with a "Maintainer" page text variable, and output pages grouped by (ie in order by) maintainer

Original proposal by Simon

(:pagelist fmt=#PagelistSortVariableORIGINAL count=16:)

Maintained by Dfaure

Maintained by [~Simon]

Maintained by Aaron

Maintained by Petko

Maintained by Simon

Maintained by Zachary

Maintained by Simon

With some modifications to the pagelist template definition

(:pagelist fmt=#PagelistSortVariable count=16:)

Maintained by Dfaure

Maintained by [~Simon]

Maintained by Aaron

Maintained by Petko

Maintained by Simon

Maintained by Zachary

Maintained by Simon

Testing including the order=$:Maintainer explicitly

(:pagelist fmt=#PagelistSortVariable count=16 group=Test $:Maintainer=?* order=$:Maintainer,$Name:)

Maintained by Dfaure

Maintained by [~Simon]

Maintained by Aaron

Maintained by Petko

Maintained by Simon

Maintained by Zachary

Maintained by Simon

Maintainer:Simon

  0: 00.00 00.00 config start
  1: 00.01 00.01 config end
  2: 00.21 00.20 MarkupToHTML begin
  3: 00.21 00.20 MarkupToHTML begin
  4: 00.22 00.21 MarkupToHTML end
  5: 00.22 00.21 MarkupToHTML begin
  6: 00.22 00.21 MarkupToHTML end
  7: 00.22 00.21 MarkupToHTML begin
  8: 00.22 00.21 FPLTemplate: Chain begin
  9: 00.22 00.21 FPLTemplate: FPLTemplateLoad
 10: 00.22 00.21 FPLTemplate: FPLTemplateDefaults
 11: 00.22 00.21 FPLTemplate: FPLTemplatePageList
 12: 00.22 00.21 MakePageList pre
 13: 00.22 00.21 PageListSources begin
 14: 00.22 00.21 PageStore::ls begin wiki.d/{$FullName}
 15: 00.23 00.22 PageStore::ls merge wiki.d/{$FullName}
 16: 00.23 00.22 PageStore::ls end wiki.d/{$FullName}
 17: 00.23 00.22 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 18: 00.23 00.22 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 19: 00.23 00.22 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 20: 00.23 00.22 PageListSources end count=1130
 21: 00.23 00.22 PageListSort pre ret=4 order=$:Maintainer,name
 22: 00.23 00.22 MakePageList items count=1130, filters=PageListVariables
 23: 00.94 00.87 MakePageList post count=10, readc=0
 24: 00.94 00.87 PageListSort begin
 25: 00.94 00.87 PageListSort sort
 26: 00.94 00.87 PageListSort end
 27: 00.94 00.87 MakePageList end
 28: 00.94 00.87 FPLTemplate: FPLTemplatePmWikiOrg
 29: 00.94 00.87 MarkupToHTML begin
 30: 00.94 00.87 MarkupToHTML end
 31: 00.94 00.87 FPLTemplate: FPLTemplateSliceList
 32: 00.94 00.87 FPLTemplate: FPLTemplateFormat
 33: 00.94 00.87 MarkupToHTML begin
 34: 00.95 00.88 MarkupToHTML end
 35: 00.95 00.88 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 36: 00.95 00.88 FPLTemplate: Chain end
 37: 00.95 00.88 MarkupToHTML end
 38: 00.95 00.88 MarkupToHTML begin
 39: 00.95 00.88 FPLTemplate: Chain begin
 40: 00.95 00.88 FPLTemplate: FPLTemplateLoad
 41: 00.95 00.88 FPLTemplate: FPLTemplateDefaults
 42: 00.95 00.88 FPLTemplate: FPLTemplatePageList
 43: 00.95 00.88 MakePageList pre
 44: 00.95 00.88 PageListSources begin
 45: 00.95 00.88 PageStore::ls begin wiki.d/{$FullName}
 46: 00.96 00.89 PageStore::ls merge wiki.d/{$FullName}
 47: 00.96 00.89 PageStore::ls end wiki.d/{$FullName}
 48: 00.96 00.89 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 49: 00.96 00.89 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 50: 00.96 00.89 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 51: 00.96 00.89 PageListSources end count=1130
 52: 00.96 00.89 PageListSort pre ret=4 order=$:Maintainer,$Name
 53: 00.96 00.89 MakePageList items count=1130, filters=PageListVariables
 54: 00.97 00.90 MakePageList post count=10, readc=0
 55: 00.97 00.90 PageListSort begin
 56: 00.97 00.90 PageListSort sort
 57: 00.97 00.90 PageListSort end
 58: 00.97 00.90 MakePageList end
 59: 00.97 00.90 FPLTemplate: FPLTemplatePmWikiOrg
 60: 00.97 00.90 MarkupToHTML begin
 61: 00.97 00.90 MarkupToHTML end
 62: 00.97 00.90 FPLTemplate: FPLTemplateSliceList
 63: 00.97 00.90 FPLTemplate: FPLTemplateFormat
 64: 00.97 00.90 MarkupToHTML begin
 65: 00.99 00.91 MarkupToHTML end
 66: 00.99 00.91 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 67: 00.99 00.91 FPLTemplate: Chain end
 68: 00.99 00.91 MarkupToHTML end
 69: 00.99 00.91 MarkupToHTML begin
 70: 00.99 00.91 FPLTemplate: Chain begin
 71: 00.99 00.91 FPLTemplate: FPLTemplateLoad
 72: 00.99 00.91 FPLTemplate: FPLTemplateDefaults
 73: 00.99 00.91 FPLTemplate: FPLTemplatePageList
 74: 00.99 00.91 MakePageList pre
 75: 00.99 00.91 PageListSources begin
 76: 00.99 00.91 PageStore::ls begin wiki.d/{$FullName}
 77: 00.99 00.92 PageStore::ls merge wiki.d/{$FullName}
 78: 01.00 00.92 PageStore::ls end wiki.d/{$FullName}
 79: 01.00 00.92 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 80: 01.00 00.92 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 81: 01.00 00.92 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 82: 01.00 00.92 PageListSources end count=1130
 83: 01.00 00.92 PageListSort pre ret=4 order=$:Maintainer,$Name
 84: 01.00 00.92 MakePageList items count=1130, filters=PageListVariables
 85: 01.01 00.93 MakePageList post count=10, readc=0
 86: 01.01 00.93 PageListSort begin
 87: 01.01 00.93 PageListSort sort
 88: 01.01 00.93 PageListSort end
 89: 01.01 00.93 MakePageList end
 90: 01.01 00.93 FPLTemplate: FPLTemplatePmWikiOrg
 91: 01.01 00.93 MarkupToHTML begin
 92: 01.01 00.93 MarkupToHTML end
 93: 01.01 00.93 FPLTemplate: FPLTemplateSliceList
 94: 01.01 00.93 FPLTemplate: FPLTemplateFormat
 95: 01.01 00.93 MarkupToHTML begin
 96: 01.02 00.94 MarkupToHTML end
 97: 01.02 00.94 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 98: 01.02 00.94 FPLTemplate: Chain end
 99: 01.02 00.94 MarkupToHTML end
100: 01.03 00.95 MarkupToHTML end
101: 01.03 00.95 MarkupToHTML begin
102: 01.04 00.96 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
103: 01.04 00.96 ReadApprovedUrls SiteAdmin.ApprovedUrls end
104: 01.05 00.97 MarkupToHTML end
105: 01.05 00.97 MarkupToHTML begin
106: 01.05 00.97 MarkupToHTML end
107: 01.05 00.97 now
Peak memory: 7,121,544 bytes