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}? [2022] ({=$LastModified})

>>font-size:small<<
(:pagelist fmt=#lastmodified order=-time,title group=Profiles count=20:)
>><<
2022
Petko-rc [2022] (August 15, 2022, at 08:31 AM)
Benedikt Hochstrasser [2022] (August 10, 2022, at 08:58 AM)
Said Achmiz [2022] (July 17, 2022, at 01:02 PM)
Kirk Siqveland [2022] (July 02, 2022, at 02:00 PM)
Bheesham [2022] (July 01, 2022, at 08:55 PM)
Simon's profile [2022] (April 26, 2022, at 10:31 AM)
Siegfried Seibert [2022] (March 28, 2022, at 05:45 PM)
Matt Jhsn [2022] (March 03, 2022, at 12:42 AM)
Marc [2022] (March 01, 2022, at 02:57 PM)
GNU Zoo Include 1 [2022] (February 10, 2022, at 09:43 PM)
GNU Zoo [2022] (February 10, 2022, at 09:36 PM)
Anomen [2022] (February 08, 2022, at 02:08 PM)
Petko [2022] (January 17, 2022, at 07:08 AM)
Robert Langston [2022] (January 15, 2022, at 07:25 AM)
Pierre [2022] (January 03, 2022, at 04:52 PM)
Pierre Rousseau [2022] (January 03, 2022, at 03:58 PM)
2021
PRZ [2021] (December 29, 2021, at 01:19 AM)
Neil Herber [2021] (December 27, 2021, at 02:29 AM)
Des [2021] (December 23, 2021, at 07:50 AM)
Mateusz [2021] (December 23, 2021, at 07:50 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 2022 :)

2022

(:template each:)

{=$Titlespaced}? [2022-08-16] ({=$Created})

>>font-size:small<<
(:pagelist fmt=#created order=-ctime,title group=Cookbook count=20:)
>><<
1969
Magic Menus [2022-08-16] ()
Toggler [2022-08-16] ()
Checklists [2022-08-16] ()
In Category-Users [2022-08-16] ()
In Category [2022-08-16] ()
Server Info [2022-08-16] ()
Attach Image Size-Talk [2022-08-16] ()
Deactivate Paragraph Tag [2022-08-16] ()
Lazy Loading-Users [2022-08-16] ()
Lazy Loading [2022-08-16] ()
Embed Facebook [2022-08-16] ()
Custom Syntax-Users [2022-08-16] ()
Custom Syntax-Talk [2022-08-16] ()
Messages Replacement [2022-08-16] ()
Simple Recipe Template [2022-08-16] ()
Hide Diff [2022-08-16] ()
Fuse Edit [2022-08-16] ()
Reindex Categories-Users [2022-08-16] ()
Journal [2022-08-16] ()
$CustomSyntax [2022-08-16] ()

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.01 00.01 config end
 2: 00.12 00.11 MarkupToHTML begin
 3: 00.12 00.11 MarkupToHTML begin
 4: 00.14 00.13 MarkupToHTML end
 5: 00.14 00.13 MarkupToHTML begin
 6: 00.14 00.13 FPLTemplate: Chain begin
 7: 00.14 00.13 FPLTemplate: FPLTemplateLoad
 8: 00.14 00.13 FPLTemplate: FPLTemplateDefaults
 9: 00.14 00.13 FPLTemplate: FPLTemplatePageList
10: 00.14 00.13 MakePageList pre
11: 00.14 00.13 PageListSources begin
12: 00.14 00.13 PageStore::ls begin wiki.d/{$FullName}
13: 00.15 00.14 PageStore::ls merge wiki.d/{$FullName}
14: 00.16 00.15 PageStore::ls end wiki.d/{$FullName}
15: 00.16 00.15 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
16: 00.16 00.15 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
17: 00.16 00.15 PageStore::ls end $FarmD/wikilib.d/{$FullName}
18: 00.16 00.15 PageListSources end count=1030
19: 00.16 00.15 PageListSort pre ret=6 order=-time,title
20: 00.16 00.15 MakePageList items count=1030, filters=PageListSort
21: 00.25 00.21 MakePageList post count=1030, readc=1030
22: 00.25 00.21 PageListSort begin
23: 00.26 00.22 PageListSort sort
24: 00.28 00.24 PageListSort end
25: 00.28 00.24 MakePageList end
26: 00.28 00.24 FPLTemplate: FPLTemplatePmWikiOrg
27: 00.28 00.24 MarkupToHTML begin
28: 00.28 00.24 MarkupToHTML end
29: 00.28 00.24 FPLTemplate: FPLTemplateSliceList
30: 00.28 00.24 FPLTemplate: FPLTemplateFormat
31: 00.29 00.25 MarkupToHTML begin
32: 00.31 00.27 MarkupToHTML end
33: 00.31 00.27 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
34: 00.31 00.27 FPLTemplate: Chain end
35: 00.31 00.27 MarkupToHTML end
36: 00.31 00.27 MarkupToHTML begin
37: 00.31 00.27 MarkupToHTML end
38: 00.31 00.27 MarkupToHTML begin
39: 00.31 00.27 FPLTemplate: Chain begin
40: 00.31 00.27 FPLTemplate: FPLTemplateLoad
41: 00.31 00.27 FPLTemplate: FPLTemplateDefaults
42: 00.31 00.27 FPLTemplate: FPLTemplatePageList
43: 00.31 00.27 MakePageList pre
44: 00.31 00.27 PageListSources begin
45: 00.31 00.27 PageStore::ls begin wiki.d/{$FullName}
46: 00.32 00.28 PageStore::ls merge wiki.d/{$FullName}
47: 00.33 00.29 PageStore::ls end wiki.d/{$FullName}
48: 00.33 00.29 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
49: 00.33 00.29 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
50: 00.33 00.29 PageStore::ls end $FarmD/wikilib.d/{$FullName}
51: 00.33 00.29 PageListSources end count=2243
52: 00.33 00.29 PageListSort pre ret=6 order=-ctime,title
53: 00.33 00.29 MakePageList items count=2243, filters=PageListSort
54: 00.58 00.46 MakePageList post count=2243, readc=2243
55: 00.58 00.46 PageListSort begin
56: 00.61 00.49 PageListSort sort
57: 00.64 00.52 PageListSort end
58: 00.64 00.52 MakePageList end
59: 00.64 00.52 FPLTemplate: FPLTemplatePmWikiOrg
60: 00.64 00.53 MarkupToHTML begin
61: 00.64 00.53 MarkupToHTML end
62: 00.64 00.53 FPLTemplate: FPLTemplateSliceList
63: 00.64 00.53 FPLTemplate: FPLTemplateFormat
64: 00.65 00.53 MarkupToHTML begin
65: 00.67 00.55 MarkupToHTML end
66: 00.67 00.55 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
67: 00.67 00.55 FPLTemplate: Chain end
68: 00.67 00.55 MarkupToHTML end
69: 00.68 00.56 MarkupToHTML end
70: 00.68 00.56 MarkupToHTML begin
71: 00.69 00.57 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
72: 00.69 00.57 ReadApprovedUrls SiteAdmin.ApprovedUrls end
73: 00.70 00.57 MarkupToHTML end
74: 00.70 00.57 MarkupToHTML begin
75: 00.70 00.58 MarkupToHTML end
76: 00.71 00.58 now
Peak memory: 9,840,848 bytes