Last modified: 2006-06-19 11:50:10 UTC
There should be a method of a special page setting its title at runtime dependant on other conditions (like parameters) The page above should have "OutputDebugString" in the page title and the first header.
Eh?
Well, currently, Special pages have one and only one title. In this case, it is "API Calls" but I'd like to be able to include the API call name (in this case, "OutputDebugString"). Of course this can only be determined at runtime by the handler function which rules out setting the name in the message cache. I'm open to other ways of doing this, but if there isn't, my feature request still stands.
If I understand correctly (from the above and from checking in IRC) what is meant is, for example, to allow Special:Contributions/SomeUser to set the HTML title to "User contributions--SomeUser". Similarly for other Special pages like "Block log" and indeed the "Logs" page which takes a variety of parameters, amend the title to include some description of the parameters (eg "Deletion log for SomeUser", "Block log for SomeAdmin against SomeVandal"). This would make it much easier to distinguish between several open pages which would otherwise have identical titles showing in the tabs or buttons corresponding to those pages.
Aha. Well, this can be done in code now. class Foo extends SpecialPage { function execute( $par ) { global $wgOut; $this->setHeaders(); if( strtolower( $par ) == 'foo' ) $wgOut->setPageTitle( 'Foo' ); } Resolving WORKSFORME. Just add the code to your extension as needed.
Confirmed working here. I'll see if I can document this on the "creating special pages" page on meta. Thanks again