Template:Home/RecentUpdates
More actions
Designed replacement for the raw {{Special:RecentChanges}} transclusion the
Main Page used to carry. That transclusion set the page's parser-cache TTL to 0,
so every anonymous view re-parsed the whole page. The card now works in two
layers. The server renders six SMW rows (most recently edited database and
encyclopedia pages) through Template:Home/RecentUpdatesRow; that render is
fully parser-cacheable and is what no-JS readers and crawlers keep. On load the
recent-updates module in MediaWiki:Common.js replaces those rows with a live
client-side render of action=query&list=recentchanges, grouped per page: change
count, byte delta, user, edit summary, relative time and a combined diff link.
If the API call fails or returns nothing the SMW rows stay in place.
Data attributes on the .home-recent div steer the module:
- data-lw-rows: how many grouped rows to render.
- data-lw-ns: pipe-separated namespace numbers for rcnamespace. News:, Research:
and Portal: are ns0 title prefixes on this wiki, not namespaces, so they cannot be excluded here; use data-lw-exclude.
- data-lw-exclude: pipe-separated title prefixes to skip. News and Research have
their own feed cards above and Main Page is the page itself.
Styles in Template:Home/Cards - styles/styles.css; night variants in MediaWiki:Common.css.