![]() Release status: beta |
|
---|---|
Implementation | Hook | , Special page
Description | Shows direct children of current page in article header |
Author(s) | (thomas-topway-ittalk) |
Latest version | 1.0 (2023-06-29) |
Compatibility policy | Master maintains backward compatibility. |
MediaWiki | 1.35+ |
License | GNU General Public License 2.0 or later |
Download | Download extension Git [?]: |
Quarterly downloads | 3 (Ranked 167th) |
Translate the SubpageNavigation extension if it is available at translatewiki.net | |
SubpageNavigation shows a collapsible list of subpages on the header of each article, including empty articles, with subpages. By contrast to other similar extensions, SubpageNavigation does not require to add a parser function in the wikitext, and shows only direct children of a page. (a direct child, however, might include slashes if the parent page does not exist). It also features a breadcrumb navigation placed above the title, and a special page where to browse all the pages of the wiki grouped by subpages, in a similar way to the Github file manager.
Installation
- Download and place the file(s) in a directory called
SubpageNavigation
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'SubpageNavigation' );
file: Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Features
Collapsible list of subpages
After installation, going in any page of your wiki with subpages, the extension will show an header like the following.
Breadcrumb
When the current page has a parent page, the extension will also show a breadcrumb navigation like the following:
The breadcrumb is also shown on Special pages navigation, so the user can easily return to the list of Special pages.
Empty articles
The list of subpages is also shown for non-existing articles, this is useful for instance when subpages are created in a programmatic way: however if the intermediate pages are empty, the children won't be grouped in the Special Page "Subpages navigation", so it is always preferable to have at least an empty article for each intermediate level.
Special Subpages Navigation
When the list of subpages shown on a given article exceeds a given threshold, SubpagesNavigation will display a link to a Special Page where the user can navigate the entire list of subbpages with the standard MediaWiki navigation.
If the item is a page, the link will direct to such page, while if the item is a page containing other subpages (that is a "folder") the link will open the same special page with the list of its children.
Finally, because the list of direct subpages of a given page are retrieved through a complex SQL query, rather than filtered in a second time, the list can be paginated in a precise way allowing a standard navigation among an arbitrary number of entries.
Known issues
Currently breadcrumb is disabled for the Vector-2022 skin. This because the breadcrumb is currently inserted within the Page status indicators, and it seems that there is no way on such skin to manually display the indicators above the title.
Support & bugs
Please post error messages in the Talk page of the extension.
Roadmap
- use a recursive SQL query's Hierarchical Data Traversal to count correctly direct children directly in the query