Erik Moeller wrote:
Just a relatively small hypothetical change I'd like to solicit feedback on: Currently the page title (the part of the page rendered in <h1>) is simply a single string, sometimes concatenated from multiple components.
Titles are passed around as objects internally; they consist of multiple components, chiefly an enumerated namespace identifier and a string main part. They may also contain an interwiki prefix and/or a fragment identifier.
If you see raw strings still being passed around for titles internally, that's old code that should be fixed up.
Or, if you specifically mean what goes into the <h1>...</h1>, that's set by whatever fun function is running the output for this view (eg, Article::view, Article::edit, the special page, etc.).
I'd like to split it into an associative array, e.g.
array( 'action'=>'Editing', 'namespace'=>'Talk', 'mainpart'=>'French revolution', 'section'=>true )
Except for 'mainpart', all keys would be optional. The main reason I'd like to do this is so we can style namespaces separately from the title (and perhaps even associate them with icons). But I think it would come in handy for skinning in general.
Well, in what way would this help?
There's already separate styling per namespace with a class identifier. Do you want something different from this? Examples?
Any objections to this change, or did I overlook any gotchas?
What are the many ways you'd use it?
-- brion vibber (brion @ pobox.com)