Reputation: 594
Attempting to transclude a subpage from its parent page via its relative name {{/subpageName}}
causes the parent page to display a red link to a page literally named /subpageName
, when it should be displaying the contents of parentpageName/subpageName
.
Similarly, when navigating directly to a subpage, the sub-header that normally displays an automatic link to the current page's parent is always missing (the sub-header is usually displayed in the #contentSub
element at the top of the page, directly beneath the page title).
It seems as though MediaWiki isn't recognizing forward slashes as indicative of a directory structure. The MediaWiki documentation seems to indicate that subpages are a default behavior and that no extensions or special settings are required (https://meta.wikimedia.org/wiki/Help:Template#Relative_name_for_transcluded_page).
I'm using MediaWiki 1.28 via the Bitnami 1.28 Turnkey MediaWiki package installed on Windows 10. I've tried purging the cache and disabling all MediaWiki extensions (neither made subpages work).
Does anyone know what might be causing this?
Upvotes: 1
Views: 534
Reputation: 28210
Not all MediaWiki namespaces are subpage-aware (because they need to handle titles with slashes in them - it would be weird, if, say, the Wikipedia entry on AC/DC would link to AC as a parent page). You can use $wgNamespacesWithSubpages
to configure which ones should be. So if you want {{/subpageName}}
to work in the main namespace, you can set
$wgNamespacesWithSubpages[NS_MAIN] = true;
in your LocalSettings.php
.
Upvotes: 2