Extension:StructuredNavigation

MediaWiki extensions manual
OOjs UI icon advanced.svg
StructuredNavigation
Release status: stable
Structured-navigation.svg
Implementation ContentHandler , Tag
Description Allows creating machine-readable navigation templates
Author(s)
Latest version 2.0.0
MediaWiki 1.34+
Database changes No
License MIT License
Download
  • $wgStructuredNavigationEnableExperimentalAPI
  • $wgStructuredNavigationReservedUsername
  • structurednav-create
  • structurednav-edit
Translate the StructuredNavigation extension if it is available at translatewiki.net

Check usage and version matrix.

The StructuredNavigation extension allows users to create machine-readable navigation templates.

InstallationEdit

  • Download and place the file(s) in a directory called StructuredNavigation in your extensions/ folder.
  • Only when installing from git run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See task T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'StructuredNavigation' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

UsageEdit

You can play with an example in /docs/examples (from the source code repository). For this example, let's try using wikipedia-en-dontnod-entertainment.json.

  1. Create a new page at Navigation:Dontnod Entertainment, import the JSON into that page, then save your edit.
  2. At a separate wikitext page, add <mw-navigation title="Dontnod Entertainment"> and press save.

HistoryEdit

In December 2018, I thought that creating navigations were annoying, especially considering every wiki had a different way of creating those navigations. This resulted in me creating the StructuredNavigation extension. However, there are some pitfalls:

This extension is still stable and currently works. Please note that this extension is free and open source, and I only work on this extension when I have free time. However, if you like this extension and enjoy using it, or have any feedback, please let me know and post them on the discussion page. Thank you!