Last modified: 2006-06-19 11:50:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6355 - Set the HTML title for a Special Page dynamically according to conditions
Set the HTML title for a Special Page dynamically according to conditions
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://hashvb.earlsoft.co.uk/Special:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-18 09:16 UTC by dean
Modified: 2006-06-19 11:50 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description dean 2006-06-18 09:16:05 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.
Comment 1 Rob Church 2006-06-18 13:32:57 UTC
Eh?
Comment 2 dean 2006-06-18 20:09:18 UTC
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.
Comment 3 Phil Boswell 2006-06-19 11:40:40 UTC
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.
Comment 4 Rob Church 2006-06-19 11:44:08 UTC
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.
Comment 5 dean 2006-06-19 11:50:10 UTC
Confirmed working here.

I'll see if I can document this on the "creating special 
pages" page on meta.

Thanks again

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links