Jump to content

HopperWiki:Front page management

From HopperWiki

Front page

These are templates that transclude content into the flex boxes of the forward facing page, but they may also be used elsewhere.

Front page templates

News

The news ecosystem on HopperWiki involves a data page where news items are stored and curated in JavaScript as well as two templates one for external news about our author, and one for news about the wiki itself pull information from those data pages and display them on forward facing pages.

Relevant pages

Module:News: Main Module that controls the news structure.

HopperWiki news (now live on the front page)

Orthoptera news

This is a separate news feed that has not yet gone live for external Orthoptera news.

See other relevant pages here.

Featured

The Featured ecosystem on HopperWiki is a system for dynamically highlighting featured content β€” such as a person, resource, or species β€” on the front page or elsewhere across the wiki.

Each featured theme (e.g. person, resource, species) is built using the same modular structure and consists of:

  • A base template namespace (e.g. Template:Featured person)
  • A set of subpages connected to that template β€” one per featured item (e.g. Template:Featured person/Koutaro Ould Maeno)
  • A centralized Lua module (Module:Featured) which dynamically selects and renders the most recent entry by querying Cargo
  • Template:Featured register which handles automatic Cargo registration on each subpage
  • An automatically updating archive page (e.g. Template:Featured person/archive) that shows all previously featured entries

How it works

Each featured item subpage calls {{Featured register}} inside a <noinclude> block, which stores the item's type and date in the Featured_content Cargo table:

{{Featured register|type=person|date_featured=YYYY-MM-DD}}

The module queries Cargo directly, ordering by date_featured descending, and selects the most recent entry to render on the front page. The archive page uses the same query to list all entries. No index page is required β€” registration is automatic on subpage save.

Only one step is required: create a subpage under the template of choice with the register call at the top inside <noinclude> tags.

For example, to add a new featured species, create Template:Featured species/Leather-colored bird locust (Schistocerca alutacea) with:

<noinclude>{{Featured register|type=species|date_featured=YYYY-MM-DD}}</noinclude>
Content of the featured card goes here...

Substitute type=species with type=person or type=resource as appropriate. The Cargo table updates automatically β€” no index page edit needed.

Scheduling future items

Setting date_featured to a future date will suppress the item until that date arrives, since the module only surfaces entries on or before today.

Output options

  • To display the most recent featured item:
{{#invoke:Featured|render|person}}
  • To display an archive of all featured items:
{{#invoke:Featured|render_archive|person}}

Substitute person with resource, species, or other configured types as needed.

See also

πŸ“¦ Core module and shared templates

Cookies help us deliver our services. By using our services, you agree to our use of cookies.