Pages when modified

Pagelist by date modified

This pagelist attempts to list, by year, when pages were last modified.
The pagelist should group pages by year of modification, with one heading per year group.

I can't get the first directive to work the way I hoped it would.

lastmodified pagelist
>>comment<<
[[#lastmodified]]
(:template defaults list=normal name=-HomePage,-Template:)
(:template first {=$LastModifiedYear} :)
-< {=$LastModifiedYear}
(:template each:)
-> [[{=$FullName}|{=$Titlespaced}]] [-[{(ftime fmt="%Y" when="@{=$LastModifiedTime}")}] ({=$LastModified})-]
[[#lastmodifiedend]]
>><<

(:template defaults list=normal name=-HomePage,-Template:) (:template first {=$LastModifiedYear} :)

{=$LastModifiedYear}

(:template each:)

{=$Titlespaced}? [1970] ({=$LastModified})

>>font-size:small<<
(:pagelist fmt=#lastmodified order=-time,title group=Profiles count=20:)
>><<
2019
Petko-rc [2019] (September 16, 2019, at 02:27 PM)
LS Meng [2019] (September 12, 2019, at 05:11 AM)
Simon's profile [2019] (August 31, 2019, at 07:52 PM)
MF Wolff-Talk [2019] (August 30, 2019, at 10:47 AM)
Finar [2019] (June 27, 2019, at 11:38 AM)
Adam [2019] (June 11, 2019, at 10:28 AM)
GNU Zoo [2019] (May 13, 2019, at 09:10 PM)
Tom G [2019] (May 13, 2019, at 09:05 PM)
Jyoti [2019] (May 10, 2019, at 02:16 AM)
GNU Zoo Link [2019] (May 07, 2019, at 09:42 PM)
Neil Herber [2019] (April 29, 2019, at 01:36 AM)
Paul Wiegmans [2019] (April 27, 2019, at 01:32 PM)
Petko [2019] (April 02, 2019, at 09:08 AM)
MF Wolff [2019] (March 28, 2019, at 12:09 PM)
Said Achmiz [2019] (March 27, 2019, at 05:43 PM)
Kirk [2019] (March 27, 2019, at 05:01 PM)
Петко [2019] (March 19, 2019, at 08:36 PM)
Peter Kay [2019] (February 25, 2019, at 05:14 PM)
Mykhal [2019] (February 08, 2019, at 12:05 PM)
Said Achmiz-Workshop [2019] (January 28, 2019, at 11:34 AM)


Add the following lines to config.php to get the following pagelist to work

$FmtPV['$Created'] = "strftime(\$GLOBALS['TimeFmt'], \$page['ctime'])";
$FmtPV['$CreatedTime'] = '$page["ctime"]';
created pagelist
>>comment<<
[[#created]]
(:template defaults list=normal name=-HomePage,-Template:)
(:template first {(ftime fmt="%Y" when="{=$Created}")} :)
-< {(ftime fmt="%Y" when="{=$Created}")}
(:template each:)
-> [[{=$FullName}|{=$Titlespaced}]] [-[{(ftime fmt="%F" when="@{=$CreatedTime}")}] ({=$Created})-]
[[#createdend]]
>><<

(:template defaults list=normal name=-HomePage,-Template:) (:template first 1970 :)

1970

(:template each:)

{=$Titlespaced}? [1970-01-01] ({=$Created})

>>font-size:small<<
(:pagelist fmt=#created order=-ctime,title group=Cookbook count=20:)
>><<
1969
Redirect Intermap-Talk [1970-01-01] ()
Short UR Ls-Talk [1970-01-01] ()
Share Buttons-Talk [1970-01-01] ()
Share Buttons [1970-01-01] ()
Pagelist Site Map-Talk [1970-01-01] ()
I Cal Export-Users [1970-01-01] ()
Link Tel-Talk [1970-01-01] ()
Worse-Talk [1970-01-01] ()
Embed More [1970-01-01] ()
Backup HTML Zip-Talk [1970-01-01] ()
Backup HTML Zip-Users [1970-01-01] ()
Amp Detect [1970-01-01] ()
Cookbook V Mware [1970-01-01] ()
Pagelist By Category-Talk [1970-01-01] ()
Pccf To Pcf Override [1970-01-01] ()
Google Web Fonts-Users [1970-01-01] ()

Use a custom PageVariable $LastModifiedYear. --Petko March 15, 2011, at 03:59 AM

  $FmtPV['$LastModifiedYear'] = 'strftime("%Y", $page["time"])';
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.03 00.02 MarkupToHTML begin
 3: 00.03 00.02 MarkupToHTML begin
 4: 00.05 00.05 MarkupToHTML end
 5: 00.05 00.05 MarkupToHTML begin
 6: 00.05 00.05 FPLTemplate: Chain begin
 7: 00.05 00.05 FPLTemplate: FPLTemplateLoad
 8: 00.05 00.05 FPLTemplate: FPLTemplateDefaults
 9: 00.05 00.05 FPLTemplate: FPLTemplatePageList
10: 00.05 00.05 MakePageList pre
11: 00.05 00.05 PageListSources begin
12: 00.05 00.05 PageStore::ls begin wiki.d/{$FullName}
13: 00.06 00.05 PageStore::ls merge wiki.d/{$FullName}
14: 00.07 00.06 PageStore::ls end wiki.d/{$FullName}
15: 00.07 00.06 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
16: 00.07 00.06 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
17: 00.07 00.06 PageStore::ls end $FarmD/wikilib.d/{$FullName}
18: 00.07 00.06 PageListSources end count=1008
19: 00.07 00.06 PageListSort pre ret=6 order=-time,title
20: 00.07 00.06 MakePageList items count=1008, filters=PageListSort
21: 00.15 00.12 MakePageList post count=1008, readc=1008
22: 00.15 00.12 PageListSort begin
23: 00.16 00.14 PageListSort sort
24: 00.19 00.16 PageListSort end
25: 00.19 00.16 MakePageList end
26: 00.19 00.16 FPLTemplate: FPLTemplatePmWikiOrg
27: 00.19 00.17 MarkupToHTML begin
28: 00.19 00.17 MarkupToHTML end
29: 00.19 00.17 FPLTemplate: FPLTemplateSliceList
30: 00.19 00.17 FPLTemplate: FPLTemplateFormat
31: 00.20 00.17 MarkupToHTML begin
32: 00.24 00.20 MarkupToHTML end
33: 00.24 00.20 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
34: 00.24 00.20 FPLTemplate: Chain end
35: 00.25 00.20 MarkupToHTML end
36: 00.25 00.20 MarkupToHTML begin
37: 00.25 00.20 MarkupToHTML end
38: 00.25 00.20 MarkupToHTML begin
39: 00.25 00.20 FPLTemplate: Chain begin
40: 00.25 00.20 FPLTemplate: FPLTemplateLoad
41: 00.25 00.20 FPLTemplate: FPLTemplateDefaults
42: 00.25 00.20 FPLTemplate: FPLTemplatePageList
43: 00.25 00.20 MakePageList pre
44: 00.25 00.20 PageListSources begin
45: 00.25 00.20 PageStore::ls begin wiki.d/{$FullName}
46: 00.27 00.21 PageStore::ls merge wiki.d/{$FullName}
47: 00.29 00.22 PageStore::ls end wiki.d/{$FullName}
48: 00.29 00.22 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
49: 00.29 00.22 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
50: 00.29 00.22 PageStore::ls end $FarmD/wikilib.d/{$FullName}
51: 00.29 00.22 PageListSources end count=2165
52: 00.29 00.22 PageListSort pre ret=6 order=-ctime,title
53: 00.29 00.22 MakePageList items count=2165, filters=PageListSort
54: 00.74 00.42 MakePageList post count=2165, readc=2165
55: 00.74 00.42 PageListSort begin
56: 00.77 00.45 PageListSort sort
57: 00.82 00.50 PageListSort end
58: 00.82 00.50 MakePageList end
59: 00.82 00.50 FPLTemplate: FPLTemplatePmWikiOrg
60: 00.82 00.50 MarkupToHTML begin
61: 00.82 00.50 MarkupToHTML end
62: 00.82 00.50 FPLTemplate: FPLTemplateSliceList
63: 00.82 00.50 FPLTemplate: FPLTemplateFormat
64: 00.82 00.50 MarkupToHTML begin
65: 00.84 00.52 MarkupToHTML end
66: 00.84 00.52 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
67: 00.84 00.52 FPLTemplate: Chain end
68: 00.84 00.53 MarkupToHTML end
69: 00.85 00.54 MarkupToHTML end
70: 00.86 00.54 MarkupToHTML begin
71: 00.86 00.54 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
72: 00.87 00.55 ReadApprovedUrls SiteAdmin.ApprovedUrls end
73: 00.87 00.55 MarkupToHTML end
74: 00.87 00.55 MarkupToHTML begin
75: 00.88 00.56 MarkupToHTML end
76: 00.88 00.56 now
Peak memory: 9,415,392 bytes