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

>>font-size:small<<
(:pagelist fmt=#lastmodified order=-time,title group=Profiles count=20:)
>><<
2024
Petko-rc [2024] (April 16, 2024, at 02:55 PM)
GNU Zoo [2024] (March 08, 2024, at 07:20 PM)
Seigler [2024] (February 12, 2024, at 08:16 PM)
2023
Hans B [2023] (November 27, 2023, at 12:42 PM)
Petko [2023] (November 19, 2023, at 02:07 PM)
Pierre Racine [2023] (November 09, 2023, at 08:55 PM)
A-xn [2023] (November 01, 2023, at 02:31 PM)
Dave Cooke [2023] (October 19, 2023, at 12:53 AM)
David Kempe [2023] (April 28, 2023, at 06:53 AM)
Danny B [2023] (April 04, 2023, at 07:57 PM)
Byway [2023] (February 17, 2023, at 11:05 PM)
Simon's profile [2023] (January 04, 2023, at 10:29 PM)
Stef CT [2023] (January 04, 2023, at 06:33 PM)
2022
Neil Herber [2022] (December 07, 2022, at 08:02 PM)
Kirk [2022] (November 14, 2022, at 12:33 AM)
Tom G [2022] (October 30, 2022, at 12:59 PM)
Said Achmiz [2022] (October 30, 2022, at 02:46 AM)
Naturevault [2022] (October 24, 2022, at 02:44 AM)
Naturewiki [2022] (October 24, 2022, at 02:39 AM)
Lukystreik [2022] (October 08, 2022, at 05:41 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 2024 :)

2024

(:template each:)

{=$Titlespaced}? [2024-04-18] ({=$Created})

>>font-size:small<<
(:pagelist fmt=#created order=-ctime,title group=Cookbook count=20:)
>><<
1969
Fox Honey Pot [2024-04-18] ()
Input Star [2024-04-18] ()
Extension Design-Talk [2024-04-18] ()
Extension Design [2024-04-18] ()
Extension Hub-Talk [2024-04-18] ()
Code Highlight [2024-04-18] ()
Filterable [2024-04-18] ()
Extension Hub-Users [2024-04-18] ()
Bootstrap Icons [2024-04-18] ()
Extensions [2024-04-18] ()
Extension Hub [2024-04-18] ()
Worse-Users [2024-04-18] ()
Dark Color Scheme-Talk [2024-04-18] ()
Gpx Stat-Users [2024-04-18] ()
Debug Messages [2024-04-18] ()
Ape-Talk-Archive [2024-04-18] ()
Gpx Stat [2024-04-18] ()
Paste Img Upload-Talk [2024-04-18] ()

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.21 00.21 MarkupToHTML begin
 3: 00.21 00.21 MarkupToHTML begin
 4: 00.24 00.23 MarkupToHTML end
 5: 00.24 00.23 MarkupToHTML begin
 6: 00.24 00.23 FPLTemplate: Chain begin
 7: 00.24 00.23 FPLTemplate: FPLTemplateLoad
 8: 00.24 00.23 FPLTemplate: FPLTemplateDefaults
 9: 00.24 00.23 FPLTemplate: FPLTemplatePageList
10: 00.24 00.23 MakePageList pre
11: 00.24 00.23 PageListSources begin
12: 00.24 00.23 PageStore::ls begin wiki.d/{$FullName}
13: 00.25 00.24 PageStore::ls merge wiki.d/{$FullName}
14: 00.26 00.24 PageStore::ls end wiki.d/{$FullName}
15: 00.26 00.24 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
16: 00.26 00.24 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
17: 00.26 00.24 PageStore::ls end $FarmD/wikilib.d/{$FullName}
18: 00.26 00.24 PageListSources end count=1033
19: 00.26 00.24 PageListSort pre ret=6 order=-time,title
20: 00.26 00.24 MakePageList items count=1033, filters=PageListSort
21: 00.34 00.29 MakePageList post count=1033, readc=1033
22: 00.34 00.29 PageListSort begin
23: 00.35 00.31 PageListSort sort
24: 00.37 00.32 PageListSort end
25: 00.37 00.32 MakePageList end
26: 00.37 00.32 FPLTemplate: FPLTemplatePmWikiOrg
27: 00.37 00.32 MarkupToHTML begin
28: 00.37 00.32 MarkupToHTML end
29: 00.37 00.32 FPLTemplate: FPLTemplateSliceList
30: 00.37 00.32 FPLTemplate: FPLTemplateFormat
31: 00.38 00.33 MarkupToHTML begin
32: 00.39 00.35 MarkupToHTML end
33: 00.39 00.35 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
34: 00.39 00.35 FPLTemplate: Chain end
35: 00.40 00.35 MarkupToHTML end
36: 00.40 00.35 MarkupToHTML begin
37: 00.40 00.35 MarkupToHTML end
38: 00.40 00.35 MarkupToHTML begin
39: 00.40 00.36 FPLTemplate: Chain begin
40: 00.40 00.36 FPLTemplate: FPLTemplateLoad
41: 00.40 00.36 FPLTemplate: FPLTemplateDefaults
42: 00.40 00.36 FPLTemplate: FPLTemplatePageList
43: 00.40 00.36 MakePageList pre
44: 00.40 00.36 PageListSources begin
45: 00.40 00.36 PageStore::ls begin wiki.d/{$FullName}
46: 00.41 00.36 PageStore::ls merge wiki.d/{$FullName}
47: 00.41 00.36 PageStore::ls end wiki.d/{$FullName}
48: 00.41 00.36 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
49: 00.41 00.36 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
50: 00.41 00.36 PageStore::ls end $FarmD/wikilib.d/{$FullName}
51: 00.42 00.37 PageListSources end count=2298
52: 00.42 00.37 PageListSort pre ret=6 order=-ctime,title
53: 00.42 00.37 MakePageList items count=2298, filters=PageListSort
54: 00.65 00.56 MakePageList post count=2298, readc=2298
55: 00.65 00.56 PageListSort begin
56: 00.68 00.59 PageListSort sort
57: 00.72 00.63 PageListSort end
58: 00.72 00.63 MakePageList end
59: 00.72 00.63 FPLTemplate: FPLTemplatePmWikiOrg
60: 00.72 00.63 MarkupToHTML begin
61: 00.73 00.63 MarkupToHTML end
62: 00.73 00.63 FPLTemplate: FPLTemplateSliceList
63: 00.73 00.63 FPLTemplate: FPLTemplateFormat
64: 00.73 00.64 MarkupToHTML begin
65: 00.76 00.67 MarkupToHTML end
66: 00.76 00.67 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
67: 00.76 00.67 FPLTemplate: Chain end
68: 00.76 00.67 MarkupToHTML end
69: 00.77 00.68 MarkupToHTML end
70: 00.78 00.68 MarkupToHTML begin
71: 00.78 00.69 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
72: 00.79 00.69 ReadApprovedUrls SiteAdmin.ApprovedUrls end
73: 00.79 00.70 MarkupToHTML end
74: 00.79 00.70 MarkupToHTML begin
75: 00.80 00.70 MarkupToHTML end
76: 00.80 00.70 now
Peak memory: 10,299,840 bytes