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.03 00.03 MarkupToHTML begin
  3: 00.03 00.03 MarkupToHTML begin
  4: 00.04 00.04 MarkupToHTML end
  5: 00.04 00.04 MarkupToHTML begin
  6: 00.04 00.04 MarkupToHTML end
  7: 00.04 00.04 MarkupToHTML begin
  8: 00.04 00.04 FPLTemplate: Chain begin
  9: 00.04 00.04 FPLTemplate: FPLTemplateLoad
 10: 00.04 00.04 FPLTemplate: FPLTemplateDefaults
 11: 00.04 00.04 FPLTemplate: FPLTemplatePageList
 12: 00.04 00.04 MakePageList pre
 13: 00.04 00.04 PageListSources begin
 14: 00.04 00.04 PageStore::ls begin wiki.d/{$FullName}
 15: 00.05 00.04 PageStore::ls merge wiki.d/{$FullName}
 16: 00.05 00.04 PageStore::ls end wiki.d/{$FullName}
 17: 00.05 00.04 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 18: 00.05 00.04 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 19: 00.05 00.04 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 20: 00.06 00.05 PageListSources end count=1136
 21: 00.06 00.05 PageListSort pre ret=4 order=$:Maintainer,name
 22: 00.06 00.05 MakePageList items count=1136, filters=PageListVariables
 23: 00.44 00.36 MakePageList post count=10, readc=0
 24: 00.44 00.36 PageListSort begin
 25: 00.44 00.36 PageListSort sort
 26: 00.44 00.37 PageListSort end
 27: 00.44 00.37 MakePageList end
 28: 00.44 00.37 FPLTemplate: FPLTemplatePmWikiOrg
 29: 00.44 00.37 MarkupToHTML begin
 30: 00.44 00.37 MarkupToHTML end
 31: 00.44 00.37 FPLTemplate: FPLTemplateSliceList
 32: 00.44 00.37 FPLTemplate: FPLTemplateFormat
 33: 00.44 00.37 MarkupToHTML begin
 34: 00.45 00.38 MarkupToHTML end
 35: 00.45 00.38 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 36: 00.45 00.38 FPLTemplate: Chain end
 37: 00.45 00.38 MarkupToHTML end
 38: 00.45 00.38 MarkupToHTML begin
 39: 00.45 00.38 FPLTemplate: Chain begin
 40: 00.45 00.38 FPLTemplate: FPLTemplateLoad
 41: 00.45 00.38 FPLTemplate: FPLTemplateDefaults
 42: 00.45 00.38 FPLTemplate: FPLTemplatePageList
 43: 00.45 00.38 MakePageList pre
 44: 00.45 00.38 PageListSources begin
 45: 00.45 00.38 PageStore::ls begin wiki.d/{$FullName}
 46: 00.46 00.38 PageStore::ls merge wiki.d/{$FullName}
 47: 00.46 00.38 PageStore::ls end wiki.d/{$FullName}
 48: 00.46 00.38 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 49: 00.46 00.38 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 50: 00.46 00.38 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 51: 00.46 00.39 PageListSources end count=1136
 52: 00.46 00.39 PageListSort pre ret=4 order=$:Maintainer,$Name
 53: 00.46 00.39 MakePageList items count=1136, filters=PageListVariables
 54: 00.47 00.39 MakePageList post count=10, readc=0
 55: 00.47 00.39 PageListSort begin
 56: 00.47 00.39 PageListSort sort
 57: 00.47 00.39 PageListSort end
 58: 00.47 00.39 MakePageList end
 59: 00.47 00.39 FPLTemplate: FPLTemplatePmWikiOrg
 60: 00.47 00.39 MarkupToHTML begin
 61: 00.47 00.40 MarkupToHTML end
 62: 00.47 00.40 FPLTemplate: FPLTemplateSliceList
 63: 00.47 00.40 FPLTemplate: FPLTemplateFormat
 64: 00.48 00.40 MarkupToHTML begin
 65: 00.49 00.42 MarkupToHTML end
 66: 00.49 00.42 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 67: 00.49 00.42 FPLTemplate: Chain end
 68: 00.49 00.42 MarkupToHTML end
 69: 00.49 00.42 MarkupToHTML begin
 70: 00.49 00.42 FPLTemplate: Chain begin
 71: 00.49 00.42 FPLTemplate: FPLTemplateLoad
 72: 00.50 00.42 FPLTemplate: FPLTemplateDefaults
 73: 00.50 00.42 FPLTemplate: FPLTemplatePageList
 74: 00.50 00.42 MakePageList pre
 75: 00.50 00.42 PageListSources begin
 76: 00.50 00.42 PageStore::ls begin wiki.d/{$FullName}
 77: 00.50 00.42 PageStore::ls merge wiki.d/{$FullName}
 78: 00.50 00.42 PageStore::ls end wiki.d/{$FullName}
 79: 00.50 00.42 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 80: 00.50 00.42 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 81: 00.50 00.42 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 82: 00.51 00.42 PageListSources end count=1136
 83: 00.51 00.42 PageListSort pre ret=4 order=$:Maintainer,$Name
 84: 00.51 00.42 MakePageList items count=1136, filters=PageListVariables
 85: 00.51 00.43 MakePageList post count=10, readc=0
 86: 00.51 00.43 PageListSort begin
 87: 00.52 00.43 PageListSort sort
 88: 00.52 00.43 PageListSort end
 89: 00.52 00.43 MakePageList end
 90: 00.52 00.43 FPLTemplate: FPLTemplatePmWikiOrg
 91: 00.52 00.43 MarkupToHTML begin
 92: 00.52 00.43 MarkupToHTML end
 93: 00.52 00.43 FPLTemplate: FPLTemplateSliceList
 94: 00.52 00.43 FPLTemplate: FPLTemplateFormat
 95: 00.52 00.43 MarkupToHTML begin
 96: 00.53 00.45 MarkupToHTML end
 97: 00.53 00.45 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 98: 00.53 00.45 FPLTemplate: Chain end
 99: 00.53 00.45 MarkupToHTML end
100: 00.53 00.45 MarkupToHTML end
101: 00.54 00.46 MarkupToHTML begin
102: 00.55 00.46 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
103: 00.55 00.47 ReadApprovedUrls SiteAdmin.ApprovedUrls end
104: 00.56 00.47 MarkupToHTML end
105: 00.56 00.47 MarkupToHTML begin
106: 00.56 00.48 MarkupToHTML end
107: 00.56 00.48 now
Peak memory: 7,122,024 bytes