WatchLists

Summary: Track the most recent changes to a list of pages
Version: n/a
Prerequisites: PmWiki 2.2
Status: Stable
Maintainer: Petko
Users: +2 (view / edit)
Discussion: WatchLists-Talk?
License: PD

Questions answered by this recipe

How to quickly display a list of user-chosen most recently modified pages?

Description

Track the most recent changes to a list of pages

This can be very easily done with page lists on a WikiTrail.

1. Create a page Profiles/YourName-watchlist with a bulleted list of the pages that you wish to track, and some format for the pagelist. Example:

 
* [[PmWiki.Download]]
* [[Cookbook.Cookbook]]
* [[PITS.00544]]
* etc.

!!Format
[@
[[#simplelist]]
[[{=$FullName}?action=diff | {=$LastModified}]] - \
'''[[{=$FullName}]]''' - [[~{=$LastModifiedBy}]] ({=$LastModifiedSummary})\\
[[#simplelistend]]
@]

2. On your profile page add the pagelist line:

 
!! Watch list
(:pagelist trail=Profiles.YourName-watchlist fmt=Profiles.YourName-watchlist#simplelist order=-time:)

Example (the list and format are on the page Cookbook.WatchLists-watchlist):

!! Watch list
(:pagelist trail=Cookbook.WatchLists-watchlist fmt=Cookbook.WatchLists-watchlist#simplelist order=-time:)

Watch list

December 09, 2023, at 03:40 AM - Cookbook.Cookbook - simon (use category, layout (-12))
March 03, 2023, at 09:04 PM - PmWiki.PageLists - Petko (format summary example for highlighting (and to not become the summary of this page) (+0))
October 24, 2022, at 04:35 AM - PmWiki.PageVariables - Petko (markup expressions can process page variables (-26))
December 23, 2021, at 06:48 AM - Cookbook.HtpasswdForm - Dfaure (updated recipe (+48))
December 23, 2021, at 06:48 AM - Cookbook.AddDeleteLine2 - Peter Kay (Superceded by AddDeleteLine3)
September 10, 2011, at 04:56 PM - PITS.00657 - simon (implemented syntax)

Clicking on the date opens the page history.

Single page option

On a page where you have a bullet list of wiki pages follow this markup example

!!! [[Cookbook/Watch list(s)]]
(:pagelist trail={$FullName} fmt={$FullName}#watchlist:)

>>comment<<
[[#watchlist]]
(:template defaults order=-time:)
(:template first:)
||width=* style="font-size:smaller;"
(:template each:)
||%pre%[[{=$FullName}?action=diff | {=$LastModified}]]%% ||''[[{=$FullName}|{=$Groupspaced}.{=$Namespaced}]]'' ||[[~{=$LastModifiedBy}]] ||{=$LastModifiedSummary} ||{=$:Summary} ||
(:template last:)
[[#watchlistend]]
>><<

Watch list

February 22, 2024, at 03:35 PMPm Wiki.NotifyPetko(+4)How to receive email messages whenever pages are changed on the whole wiki site, individual groups or selected watchlists of pages
December 09, 2023, at 03:40 AMCookbook.Cookbooksimonuse category, layout (-12)List of cookbook recipe categories
April 30, 2023, at 06:20 PMPm Wiki.Page List TemplatesPetkofull link, test page not in distribution (+43)Creating page list format templates
March 03, 2023, at 09:04 PMPm Wiki.Page ListsPetkoformat summary example for highlighting (and to not become the summary of this page) (+0)Searching and listing pages by multiple criteria with templated output
October 24, 2022, at 04:35 AMPm Wiki.Page VariablesPetkomarkup expressions can process page variables (-26)variables that are associated with pages
December 23, 2021, at 06:48 AMCookbook.Add To WatchlistPetko20180221 : add $WatchMultiplePages.Add or remove a page from your watchlist trail with a single click
December 31, 2019, at 07:28 PMPm Wiki.DownloadPetko`https: urls (+9)Download versions of PmWiki
September 10, 2011, at 04:56 PMPITS.00544Anno Limit the number of displayed diffs at once (was: Caching for history)

(:template defaults order=-time:) (:template first:)

(:template each:)

{=$LastModified}{=$Groupspaced}.{=$Namespaced}?{=$LastModifiedBy}?{=$LastModifiedSummary}{=$:Summary}

(:template last:)

Notes
the comment hides the page list format from being displayed, yet it is used by the pagelist
you can customise the markup between the anchors ([[#...]]) as required

Notes

Text in the {$LastModifiedSummary} has control characters removed, and formatting suppressed by default.

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Comments

See Also

Contributors

User notes +2: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.