TenthFleet:Dynamic page lists: Difference between revisions

From TenthFleet
Jump to navigation Jump to search
Create editor documentation page
 
m Add Editor's Handbook read-in-order side navbox
 
Line 1: Line 1:
{{Editor handbook}}
<div class="tf-lead">This page explains how the wiki builds lists that update themselves. When you post a news item and it appears on the Main Page without anyone editing the Main Page, that is a dynamic list at work.</div>
<div class="tf-lead">This page explains how the wiki builds lists that update themselves. When you post a news item and it appears on the Main Page without anyone editing the Main Page, that is a dynamic list at work.</div>



Latest revision as of 09:04, 17 July 2026

This page explains how the wiki builds lists that update themselves. When you post a news item and it appears on the Main Page without anyone editing the Main Page, that is a dynamic list at work.

The wiki uses the DynamicPageList extension. A dynamic list is a query: you describe the pages you want, and the software fills in the list every time the page loads.

How it works, using the news feed

The news feed is the clearest example. It rests on three pieces:

  1. The {{News}} template puts every news article into the category Fleet news.
  2. The Main Page runs a query that asks for the four most recent pages in that category.
  3. The query prints each one as a headline. Nobody edits the list by hand.

The query on the Main Page reads like this:

{{#dpl:
|category=Fleet news
|notnamespace=User
|notnamespace=Sandbox
|count=4
|ordermethod=sortkey
|order=descending
}}

Read plainly: take pages in the Fleet news category, skip anything in the User or Sandbox namespaces, take the four newest by sort date, and list them.

The common settings

Setting What it does
category= Only include pages in this category.
notnamespace= Leave out a namespace. Repeat it to exclude several.
count= Limit how many results appear.
ordermethod= and order= How to sort, and in which direction.
Why the namespace filters matter
Without notnamespace=User and notnamespace=Sandbox, a draft news item written on a personal or sandbox page would leak into the public feed. The filters keep drafts out.

Making your own list

  1. Decide which category marks the pages you want. Add that category to those pages if it is not there already.
  2. Add a {{#dpl: ... }} block where you want the list, with a category= line.
  3. Preview. If nothing shows, check that pages really carry the category and that the spelling matches.
Lists can be cached
A dynamic list may not update the instant you change a source page. If it looks stale, purge the page (add ?action=purge to its address) to force a refresh.


Tenth Fleet Wiki — Editor Documentation
Start here Contributor's guide · Introduction · Be bold · Editing basics
Style & layout Manual of Style · Guide to layout · Naming conventions · Namespaces · Citing sources
Building content Peerage page · Award page · Ship page · Echelon page · Order · News item
Templates Template guide
Deep dives Styling & theme · Infoboxes · Navboxes · Dynamic lists (DPL) · Supersession · Categories
Policies & Guidelines