Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

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 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 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 Aaron

Maintained by Petko

Maintained by Simon

Maintained by Zachary

Maintained by Simon

Maintainer:Simon

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
  0: 00.00 00.00 config start
  1: 00.01 00.00 config end
  2: 00.12 00.05 MarkupToHTML begin
  3: 00.12 00.06 MarkupToHTML begin
  4: 00.13 00.07 MarkupToHTML end
  5: 00.13 00.07 MarkupToHTML begin
  6: 00.14 00.08 MarkupToHTML end
  7: 00.14 00.08 MarkupToHTML begin
  8: 00.14 00.08 FPLTemplate: Chain begin
  9: 00.14 00.08 FPLTemplate: FPLTemplateLoad
 10: 00.14 00.08 FPLTemplate: FPLTemplateDefaults
 11: 00.14 00.08 FPLTemplate: FPLTemplatePageList
 12: 00.14 00.08 MakePageList pre
 13: 00.16 00.08 PageListSources begin
 14: 00.16 00.08 PageStore::ls begin wiki.d/{$FullName}
 15: 00.19 00.10 PageStore::ls merge wiki.d/{$FullName}
 16: 00.22 00.13 PageStore::ls end wiki.d/{$FullName}
 17: 00.23 00.14 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 18: 00.23 00.14 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 19: 00.23 00.14 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 20: 00.23 00.14 PageListSources end count=1005
 21: 00.23 00.14 PageListSort pre ret=4 order=$:Maintainer,name
 22: 00.23 00.14 MakePageList items count=1005, filters=PageListVariables
 23: 01.58 01.43 MakePageList post count=8, readc=0
 24: 01.58 01.43 PageListCache begin save key=036239a273fdfb3bdb69d84b1699ad9f
 25: 01.58 01.43 PageListCache end save
 26: 01.58 01.43 PageListSort begin
 27: 01.58 01.43 PageListSort sort
 28: 01.58 01.43 PageListSort end
 29: 01.58 01.43 MakePageList end
 30: 01.58 01.43 FPLTemplate: FPLTemplateSliceList
 31: 01.58 01.43 FPLTemplate: FPLTemplateFormat
 32: 01.59 01.43 MarkupToHTML begin
 33: 01.62 01.46 MarkupToHTML end
 34: 01.62 01.46 FPLTemplate: Chain end
 35: 01.62 01.46 MarkupToHTML end
 36: 01.62 01.46 MarkupToHTML begin
 37: 01.62 01.46 FPLTemplate: Chain begin
 38: 01.62 01.46 FPLTemplate: FPLTemplateLoad
 39: 01.62 01.46 FPLTemplate: FPLTemplateDefaults
 40: 01.62 01.46 FPLTemplate: FPLTemplatePageList
 41: 01.62 01.46 MakePageList pre
 42: 01.62 01.46 PageListSources begin
 43: 01.62 01.47 PageStore::ls begin wiki.d/{$FullName}
 44: 01.65 01.49 PageStore::ls merge wiki.d/{$FullName}
 45: 01.68 01.52 PageStore::ls end wiki.d/{$FullName}
 46: 01.69 01.52 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 47: 01.69 01.52 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 48: 01.69 01.52 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 49: 01.69 01.53 PageListSources end count=1005
 50: 01.69 01.53 PageListSort pre ret=4 order=$:Maintainer,$Name
 51: 01.69 01.53 MakePageList items count=1005, filters=PageListVariables
 52: 01.76 01.59 MakePageList post count=8, readc=0
 53: 01.76 01.59 PageListCache begin save key=7824d529849f61aeb5ba84d84c85b8fb
 54: 01.76 01.59 PageListCache end save
 55: 01.76 01.59 PageListSort begin
 56: 01.76 01.59 PageListSort sort
 57: 01.76 01.59 PageListSort end
 58: 01.76 01.59 MakePageList end
 59: 01.76 01.59 FPLTemplate: FPLTemplateSliceList
 60: 01.76 01.59 FPLTemplate: FPLTemplateFormat
 61: 01.76 01.60 MarkupToHTML begin
 62: 01.79 01.63 MarkupToHTML end
 63: 01.79 01.63 FPLTemplate: Chain end
 64: 01.80 01.63 MarkupToHTML end
 65: 01.80 01.63 MarkupToHTML begin
 66: 01.80 01.63 FPLTemplate: Chain begin
 67: 01.80 01.63 FPLTemplate: FPLTemplateLoad
 68: 01.80 01.63 FPLTemplate: FPLTemplateDefaults
 69: 01.80 01.63 FPLTemplate: FPLTemplatePageList
 70: 01.80 01.63 MakePageList pre
 71: 01.80 01.63 PageListSources begin
 72: 01.80 01.63 PageStore::ls begin wiki.d/{$FullName}
 73: 01.83 01.66 PageStore::ls merge wiki.d/{$FullName}
 74: 01.86 01.69 PageStore::ls end wiki.d/{$FullName}
 75: 01.87 01.69 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 76: 01.87 01.69 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 77: 01.87 01.69 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 78: 01.87 01.70 PageListSources end count=1005
 79: 01.87 01.70 PageListSort pre ret=4 order=$:Maintainer,$Name
 80: 01.87 01.70 MakePageList items count=1005, filters=PageListVariables
 81: 01.94 01.76 MakePageList post count=8, readc=0
 82: 01.94 01.76 PageListCache begin save key=9141d742eceb7392a9b71ac6f8b091d3
 83: 01.94 01.76 PageListCache end save
 84: 01.94 01.76 PageListSort begin
 85: 01.94 01.76 PageListSort sort
 86: 01.94 01.76 PageListSort end
 87: 01.94 01.76 MakePageList end
 88: 01.94 01.76 FPLTemplate: FPLTemplateSliceList
 89: 01.94 01.76 FPLTemplate: FPLTemplateFormat
 90: 01.94 01.77 MarkupToHTML begin
 91: 01.97 01.80 MarkupToHTML end
 92: 01.97 01.80 FPLTemplate: Chain end
 93: 01.97 01.80 MarkupToHTML end
 94: 02.00 01.82 MarkupToHTML end
 95: 02.01 01.83 MarkupToHTML begin
 96: 02.03 01.86 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 97: 02.04 01.87 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 98: 02.06 01.88 MarkupToHTML end
 99: 02.06 01.89 MarkupToHTML begin
100: 02.08 01.90 MarkupToHTML end
101: 02.08 01.91 now