A more flexible version of Special:Prefixindex
that lets you omit namespaces and redirects if there is only one result.
Special:FlexiblePrefix/Title
searches across$wgFlexiblePrefixNamespaces
Special:FlexiblePrefix/Namespace:Title
searches in the given namespaceSpecial:FlexiblePrefix/:Title
searches in the main namespace
Place the extension in your extensions directory and load it with wfLoadExtension('FlexiblePrefix');
.
Then configure the default namespaces, e.g:
$wgFlexiblePrefixNamespaces = [NS_MAIN, NS_PROJECT];
- The
FlexiblePrefixDetails(Title $title, &$details, $context)
hook lets you add details to results (details is an associative array mapping keys to HTML strings). - The
FlexiblePrefixBeforeDisplay(&$items, $context)
hook lets you modify the result list before display. - The
SpecialFlexiblePrefix
class can be integrated elsewhere (either by direct instantiation or inheritance).
This extension is a rewrite of SimilarNamedArticles by Mathias Ertl.