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.21 MarkupToHTML begin
  3: 00.22 00.21 MarkupToHTML begin
  4: 00.23 00.23 MarkupToHTML end
  5: 00.23 00.23 MarkupToHTML begin
  6: 00.23 00.23 MarkupToHTML end
  7: 00.23 00.23 MarkupToHTML begin
  8: 00.23 00.23 FPLTemplate: Chain begin
  9: 00.23 00.23 FPLTemplate: FPLTemplateLoad
 10: 00.23 00.23 FPLTemplate: FPLTemplateDefaults
 11: 00.23 00.23 FPLTemplate: FPLTemplatePageList
 12: 00.23 00.23 MakePageList pre
 13: 00.23 00.23 PageListSources begin
 14: 00.23 00.23 PageStore::ls begin wiki.d/{$FullName}
 15: 00.24 00.24 PageStore::ls merge wiki.d/{$FullName}
 16: 00.25 00.24 PageStore::ls end wiki.d/{$FullName}
 17: 00.25 00.24 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 18: 00.25 00.24 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 19: 00.25 00.24 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 20: 00.25 00.25 PageListSources end count=1134
 21: 00.25 00.25 PageListSort pre ret=4 order=$:Maintainer,name
 22: 00.25 00.25 MakePageList items count=1134, filters=PageListVariables
 23: 01.08 01.02 MakePageList post count=10, readc=0
 24: 01.08 01.02 PageListSort begin
 25: 01.08 01.02 PageListSort sort
 26: 01.08 01.02 PageListSort end
 27: 01.08 01.02 MakePageList end
 28: 01.08 01.02 FPLTemplate: FPLTemplatePmWikiOrg
 29: 01.08 01.02 MarkupToHTML begin
 30: 01.08 01.02 MarkupToHTML end
 31: 01.08 01.02 FPLTemplate: FPLTemplateSliceList
 32: 01.08 01.02 FPLTemplate: FPLTemplateFormat
 33: 01.08 01.02 MarkupToHTML begin
 34: 01.09 01.03 MarkupToHTML end
 35: 01.09 01.03 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 36: 01.09 01.03 FPLTemplate: Chain end
 37: 01.09 01.03 MarkupToHTML end
 38: 01.09 01.03 MarkupToHTML begin
 39: 01.09 01.03 FPLTemplate: Chain begin
 40: 01.09 01.03 FPLTemplate: FPLTemplateLoad
 41: 01.09 01.03 FPLTemplate: FPLTemplateDefaults
 42: 01.09 01.03 FPLTemplate: FPLTemplatePageList
 43: 01.09 01.03 MakePageList pre
 44: 01.09 01.03 PageListSources begin
 45: 01.09 01.03 PageStore::ls begin wiki.d/{$FullName}
 46: 01.10 01.04 PageStore::ls merge wiki.d/{$FullName}
 47: 01.10 01.04 PageStore::ls end wiki.d/{$FullName}
 48: 01.10 01.04 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 49: 01.10 01.04 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 50: 01.10 01.04 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 51: 01.10 01.04 PageListSources end count=1134
 52: 01.10 01.04 PageListSort pre ret=4 order=$:Maintainer,$Name
 53: 01.10 01.04 MakePageList items count=1134, filters=PageListVariables
 54: 01.11 01.05 MakePageList post count=10, readc=0
 55: 01.11 01.05 PageListSort begin
 56: 01.11 01.05 PageListSort sort
 57: 01.11 01.05 PageListSort end
 58: 01.11 01.05 MakePageList end
 59: 01.11 01.05 FPLTemplate: FPLTemplatePmWikiOrg
 60: 01.11 01.05 MarkupToHTML begin
 61: 01.12 01.05 MarkupToHTML end
 62: 01.12 01.05 FPLTemplate: FPLTemplateSliceList
 63: 01.12 01.05 FPLTemplate: FPLTemplateFormat
 64: 01.12 01.05 MarkupToHTML begin
 65: 01.13 01.07 MarkupToHTML end
 66: 01.13 01.07 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 67: 01.13 01.07 FPLTemplate: Chain end
 68: 01.13 01.07 MarkupToHTML end
 69: 01.13 01.07 MarkupToHTML begin
 70: 01.13 01.07 FPLTemplate: Chain begin
 71: 01.13 01.07 FPLTemplate: FPLTemplateLoad
 72: 01.13 01.07 FPLTemplate: FPLTemplateDefaults
 73: 01.13 01.07 FPLTemplate: FPLTemplatePageList
 74: 01.13 01.07 MakePageList pre
 75: 01.13 01.07 PageListSources begin
 76: 01.13 01.07 PageStore::ls begin wiki.d/{$FullName}
 77: 01.14 01.07 PageStore::ls merge wiki.d/{$FullName}
 78: 01.14 01.08 PageStore::ls end wiki.d/{$FullName}
 79: 01.14 01.08 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 80: 01.14 01.08 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 81: 01.14 01.08 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 82: 01.14 01.08 PageListSources end count=1134
 83: 01.14 01.08 PageListSort pre ret=4 order=$:Maintainer,$Name
 84: 01.14 01.08 MakePageList items count=1134, filters=PageListVariables
 85: 01.15 01.09 MakePageList post count=10, readc=0
 86: 01.15 01.09 PageListSort begin
 87: 01.15 01.09 PageListSort sort
 88: 01.15 01.09 PageListSort end
 89: 01.15 01.09 MakePageList end
 90: 01.15 01.09 FPLTemplate: FPLTemplatePmWikiOrg
 91: 01.15 01.09 MarkupToHTML begin
 92: 01.15 01.09 MarkupToHTML end
 93: 01.15 01.09 FPLTemplate: FPLTemplateSliceList
 94: 01.15 01.09 FPLTemplate: FPLTemplateFormat
 95: 01.15 01.09 MarkupToHTML begin
 96: 01.17 01.10 MarkupToHTML end
 97: 01.17 01.10 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 98: 01.17 01.10 FPLTemplate: Chain end
 99: 01.17 01.10 MarkupToHTML end
100: 01.18 01.11 MarkupToHTML end
101: 01.19 01.12 MarkupToHTML begin
102: 01.20 01.12 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
103: 01.21 01.13 ReadApprovedUrls SiteAdmin.ApprovedUrls end
104: 01.22 01.13 MarkupToHTML end
105: 01.22 01.13 MarkupToHTML begin
106: 01.23 01.14 MarkupToHTML end
107: 01.23 01.14 now
Peak memory: 7,081,792 bytes