I mean, why isn't it
array('text' => 'mainpage', 'href' => 'mainpage-url'),
on $wgNavigationLinks?
I'm asking because I'm doing a dynamic Main Page as a Special:MyProject module.
- If I set MediaWiki:Mainpage to 'Special:MyProject', the Navigation menu entry changes to 'Special:MyProject', which I don't want (I still want the Main Page to show as "Main Page" on the Navigation menu).
- If I modify $wgNavigationLinks to have
array('text' => 'mainpage', 'href' => 'mainpage-url'),
and set MediaWiki:Mainpage-url to 'Special:MyProject', clicking on the Navigation entry brings my Special page, but navigating to http://mylocalhost/wiki brings me back to http://mylocalhost/wiki/Main_Page (as the software has no way to know that my new main page is to be taken from MediaWiki:Mainpage-url)
- Finally, if I do
#REDIRECT [[Special:MyProject]]
on Main_Page, it all works as expected, but the browser's navigation bar shows http://mylocalhost/wiki/Special:MyProject (which is correct but ugly).
So, it'd be nicer if MediaWiki used a MediaWiki:Mainpage for the navigation menu entry title, and a MediaWiki:Mainpage-url for the page, and the software knew that the default page comes from MediaWiki:Mainpage-url.
Or, is there a way to do that already that I'm missing? (as I suspect :)
Juanma Barranquero wrote:
I mean, why isn't it
array('text' => 'mainpage', 'href' => 'mainpage-url'),
on $wgNavigationLinks?
The main page link predates this system, and is used in a few other places under the 'mainpage' name. Hypothetically it could be changed, though...
[snip]
Or, is there a way to do that already that I'm missing? (as I suspect :)
Try: array('text' => 'mainpage-text', 'href' => 'mainpage')
-- brion vibber (brion @ pobox.com)
The main page link predates this system, and is used in a few other places under the 'mainpage' name.
Yeah, about a dozen, not counting language pages.
Hypothetically it could be changed, though...
Obviously, there's no pressing need. It'd be nice, though.
Try: array('text' => 'mainpage-text', 'href' => 'mainpage')
Clever. Your answer is like my third option, only better because it saves one redirection. I'm puzzled why I thought of changing the 'href' page and not the 'text' one... :)
Thanks,
/L/e/k/t/u
mediawiki-l@lists.wikimedia.org