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:)
>><<
2020
Utopiah [2020] (July 08, 2020, at 05:40 AM)
Petko-rc [2020] (July 08, 2020, at 04:59 AM)
Stefan Wüst @ stie.biz [2020] (June 17, 2020, at 05:14 AM)
Kavya [2020] (June 06, 2020, at 08:38 AM)
Finar [2020] (June 05, 2020, at 10:00 AM)
J Seigler [2020] (May 28, 2020, at 03:11 PM)
Tali 64 [2020] (April 26, 2020, at 06:19 PM)
Schilkek [2020] (April 25, 2020, at 01:50 AM)
Michael Eager [2020] (April 23, 2020, at 05:29 PM)
Robert Riebisch [2020] (March 19, 2020, at 05:27 PM)
Holger [2020] (March 15, 2020, at 07:45 PM)
Holger-watchlist [2020] (March 15, 2020, at 07:38 PM)
Yevmia [2020] (March 03, 2020, at 06:24 PM)
Antony Templier [2020] (February 26, 2020, at 10:29 AM)
Petko-Talk [2020] (February 25, 2020, at 06:54 PM)
Dave Cooke [2020] (January 19, 2020, at 05:40 PM)
Your Name [2020] (January 19, 2020, at 08:03 AM)
Henry Gurr [2020] (January 11, 2020, at 07:57 PM)
GNU Zoo [2020] (January 04, 2020, at 07:50 AM)
GNU Zoo Include 1 [2020] (January 03, 2020, at 08:38 PM)


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
Attachman [1970-01-01] ()
Caddy [1970-01-01] ()
Enable Tabs [1970-01-01] ()
Search Patterns-Talk [1970-01-01] ()
Hlinks [1970-01-01] ()
PDF Thumb [1970-01-01] ()
Fixme Markup [1970-01-01] ()
Zip Export [1970-01-01] ()
Edit Help-Users [1970-01-01] ()
Generate PDF-Users [1970-01-01] ()
Toggle Next-Users [1970-01-01] ()
Toggle Next-Talk [1970-01-01] ()
Toggle Next [1970-01-01] ()
Share Buttons-Users [1970-01-01] ()
Rotate Picture-Talk [1970-01-01] ()
Abc Song [1970-01-01] ()
Rotate Picture [1970-01-01] ()
I Frame Login [1970-01-01] ()
Rebuild RC [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.02 00.00 config end
 2: 00.14 00.02 MarkupToHTML begin
 3: 00.14 00.02 MarkupToHTML begin
 4: 00.18 00.05 MarkupToHTML end
 5: 00.18 00.05 MarkupToHTML begin
 6: 00.18 00.05 FPLTemplate: Chain begin
 7: 00.18 00.05 FPLTemplate: FPLTemplateLoad
 8: 00.18 00.05 FPLTemplate: FPLTemplateDefaults
 9: 00.18 00.05 FPLTemplate: FPLTemplatePageList
10: 00.18 00.05 MakePageList pre
11: 00.18 00.05 PageListSources begin
12: 00.18 00.05 PageStore::ls begin wiki.d/{$FullName}
13: 00.20 00.06 PageStore::ls merge wiki.d/{$FullName}
14: 00.22 00.07 PageStore::ls end wiki.d/{$FullName}
15: 00.22 00.07 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
16: 00.22 00.07 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
17: 00.22 00.07 PageStore::ls end $FarmD/wikilib.d/{$FullName}
18: 00.22 00.07 PageListSources end count=1016
19: 00.22 00.07 PageListSort pre ret=6 order=-time,title
20: 00.22 00.07 MakePageList items count=1016, filters=PageListSort
21: 01.28 00.14 MakePageList post count=1016, readc=1016
22: 01.28 00.14 PageListSort begin
23: 01.30 00.16 PageListSort sort
24: 01.33 00.18 PageListSort end
25: 01.33 00.18 MakePageList end
26: 01.33 00.18 FPLTemplate: FPLTemplatePmWikiOrg
27: 01.33 00.18 MarkupToHTML begin
28: 01.33 00.19 MarkupToHTML end
29: 01.33 00.19 FPLTemplate: FPLTemplateSliceList
30: 01.33 00.19 FPLTemplate: FPLTemplateFormat
31: 01.35 00.20 MarkupToHTML begin
32: 01.38 00.22 MarkupToHTML end
33: 01.38 00.22 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
34: 01.38 00.22 FPLTemplate: Chain end
35: 01.38 00.22 MarkupToHTML end
36: 01.38 00.22 MarkupToHTML begin
37: 01.38 00.22 MarkupToHTML end
38: 01.38 00.22 MarkupToHTML begin
39: 01.39 00.22 FPLTemplate: Chain begin
40: 01.39 00.22 FPLTemplate: FPLTemplateLoad
41: 01.39 00.22 FPLTemplate: FPLTemplateDefaults
42: 01.39 00.22 FPLTemplate: FPLTemplatePageList
43: 01.39 00.22 MakePageList pre
44: 01.39 00.22 PageListSources begin
45: 01.39 00.22 PageStore::ls begin wiki.d/{$FullName}
46: 01.41 00.23 PageStore::ls merge wiki.d/{$FullName}
47: 01.42 00.23 PageStore::ls end wiki.d/{$FullName}
48: 01.42 00.24 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
49: 01.42 00.24 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
50: 01.43 00.24 PageStore::ls end $FarmD/wikilib.d/{$FullName}
51: 01.43 00.24 PageListSources end count=2189
52: 01.43 00.24 PageListSort pre ret=6 order=-ctime,title
53: 01.43 00.24 MakePageList items count=2189, filters=PageListSort
54: 03.57 00.45 MakePageList post count=2189, readc=2189
55: 03.57 00.45 PageListSort begin
56: 03.60 00.48 PageListSort sort
57: 03.65 00.53 PageListSort end
58: 03.65 00.53 MakePageList end
59: 03.65 00.53 FPLTemplate: FPLTemplatePmWikiOrg
60: 03.65 00.53 MarkupToHTML begin
61: 03.65 00.53 MarkupToHTML end
62: 03.65 00.53 FPLTemplate: FPLTemplateSliceList
63: 03.65 00.53 FPLTemplate: FPLTemplateFormat
64: 03.66 00.54 MarkupToHTML begin
65: 03.68 00.56 MarkupToHTML end
66: 03.68 00.56 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
67: 03.68 00.56 FPLTemplate: Chain end
68: 03.68 00.56 MarkupToHTML end
69: 03.71 00.57 MarkupToHTML end
70: 03.72 00.57 MarkupToHTML begin
71: 03.73 00.58 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
72: 03.73 00.58 ReadApprovedUrls SiteAdmin.ApprovedUrls end
73: 03.73 00.59 MarkupToHTML end
74: 03.74 00.59 MarkupToHTML begin
75: 03.74 00.59 MarkupToHTML end
76: 03.74 00.59 now
Peak memory: 9,488,016 bytes