Last modified: 2014-10-13 14:05:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8129, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6129 - Allow suppressing page title output
Allow suppressing page title output
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: design, patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-29 18:38 UTC by Kent Sandvik
Modified: 2014-10-13 14:05 UTC (History)
5 users (show)

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


Attachments
Patch (trunk) (3.38 KB, patch)
2006-06-03 08:57 UTC, Rotem Liss
Details

Description Kent Sandvik 2006-05-29 18:38:32 UTC
Could a future MediaWiki have a configuration option to leave out the main page <h1>Main Page</h1> tag so that there's no need to 
patch .js files for removing this tag -- this means each time MediWiki is updated, the patches have to be rolled in. It would be better if this 
main page <h1> tag could be enabled or disabled per configuration setting.
Comment 1 Brion Vibber 2006-05-29 20:21:11 UTC
It's not meant to be removed.
Comment 2 Kent Sandvik 2006-05-29 21:22:58 UTC
Hmm, mediawiki has it removed, and many other sites use various Javascript hacks to have it removed...
Comment 3 Rotem Liss 2006-05-30 11:12:34 UTC
(In reply to comment #2)
> Hmm, mediawiki has it removed

Do you mean the English Wikipedia?

BTW, I support allowing this title to be removed: why should we have the big
"Main Page" title? Normally, users know that if there is no title, it is the
main page. However, I support creating a configuration option (e.g.
$wgShowMainPageTitle), not removing the title for all the sites.
Comment 4 Kent Sandvik 2006-05-30 16:31:44 UTC
Yes, $wgShowMainPageTitle, is very good. 
Comment 5 Rotem Liss 2006-06-03 08:57:41 UTC
Created attachment 1886 [details]
Patch (trunk)

This patch creates the configuration setting $wgHideMainPageTitle, which hides
both the title "Main Page" (in every language) and the sub-title "From
{{SITENAME}}" when on.
Comment 6 Rob Church 2006-07-04 08:09:18 UTC
Don't like it either. Hiding information for the sake of aesthetics is
useless...use CSS for this...I'd support adding a conditional CSS class to the
heading when viewing the main page.
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-04 08:17:13 UTC
So we would have <h1 style="display: none;">Main Page</h1>?  What's the point in
including it altogether, then?  The <title> will stay say "Main Page".
Comment 8 Rob Church 2006-07-04 09:37:44 UTC
No, we'd have <h1 class="maintitle"> or somesuch.
Comment 9 Antoine "hashar" Musso (WMF) 2007-05-10 21:31:38 UTC
Added the css tweak to the FAQ:
http://www.mediawiki.org/w/index.php?title=Manual:FAQ&diff=93496&oldid=85303

Marking bug as WONTFIX (per design: comment #1)
Comment 10 MZMcBride 2010-08-07 05:57:02 UTC
Re-opening. This is a semi-frequent feature request and I don't see a particularly good reason for it not to be a feature in core. The reality is that plenty of sites, including the English Wikipedia, do hide the page title of particular pages. This doesn't need to be intentionally made difficult (compare to the |link= debate for image syntax).

I see two possible implementation options using a __NOTITLE__ magic word:
(1) the magic word removes the <h1> altogether;
(2) the magic word modifies the <h1> to include a "hidepagetitle" CSS class that's defined in skins/common/ somewhere as being display:none;
Comment 11 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-08-08 15:36:20 UTC
What's wrong with a CSS fix here?  A __NOTITLE__ magic word seems prone to abuse, since any user could add it to any page they can edit.
Comment 12 MZMcBride 2010-08-08 18:15:56 UTC
(In reply to comment #11)
> What's wrong with a CSS fix here?  A __NOTITLE__ magic word seems prone to
> abuse, since any user could add it to any page they can edit.

I don't think a CSS implementation is a bad idea here (see option 2), I just don't think requiring every new wiki admin who wants to hide the title of their main page (or whatever page) to edit their CSS individually is a very good design/practice for MediaWiki.

I don't see how __NOTITLE__ is more prone to abuse than blanking a page, filling it with "penis" written over and over, adding __NOINDEX__ (if it's not in a content namespace), etc.
Comment 13 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-08-08 19:00:46 UTC
(In reply to comment #12)
> I don't see how __NOTITLE__ is more prone to abuse than blanking a page,
> filling it with "penis" written over and over, adding __NOINDEX__ (if it's not
> in a content namespace), etc.

Granted.
Comment 14 MZMcBride 2010-08-08 21:27:32 UTC
I think another advantage to a system like this is that, by modifying the generated HTML with an additional CSS class and storing it in the default MediaWiki skin files, you'd avoid the 30-day caching issues that often come with changes to the site-wide CSS pages.

While it's true that a Main Page doesn't change titles very often, the other use-cases for this template may mean that the page title could change, making body.page-hackery not very practical or efficient.

The working implementation of magic word usage tracking (it's used with __NOINDEX__ and maybe some other magic right now) also makes this feature less of a big deal, in my view.

Changing bug summary from "Allow suppressing title output on the main page" to "Allow suppressing page title output".
Comment 15 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-08-08 21:29:04 UTC
What are the use-cases beyond the main page?  I haven't seen any mentioned.  Is anyone actually doing this already with CSS for non-main pages?
Comment 16 MZMcBride 2010-08-08 21:38:10 UTC
(In reply to comment #15)
> What are the use-cases beyond the main page?  I haven't seen any mentioned.  Is
> anyone actually doing this already with CSS for non-main pages?

I assume there are other use-cases given the train wreck of an extension at <http://www.mediawiki.org/wiki/Extension:NoTitle>. The implementation there and the talk page suggest that people have used it on other pages beside the Main Page (there's a section regarding its use with tranclusion), but I'm not sure how easy it would be to search for specific use-cases. The fact that Special:Version is intentionally excluded from search engines and the fact that magic word usage tracking has historically not existed don't aid the hunt.

There have even been several rewrites, including one for 1.16 in May 2010, making it clear to me that this is a desired feature for MediaWiki, though.
Comment 17 p858snake 2011-04-30 00:09:57 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 18 Sumana Harihareswara 2011-11-09 20:04:19 UTC
Rotem, thank you for your patch.  Your patch no longer applies to trunk, and I'm adding the "reviewed" keyword; if you'd like to get more discussion and suggestions for revision, please feel free to remove it and add "need-review," or ask for suggestions on the #mediawiki IRC channel on freenode, or the wikitech-l mailing list https://lists.wikimedia.org/mailman/listinfo/wikitech-l .  Thanks again.
Comment 19 Quim Gil 2013-07-18 08:48:12 UTC
(In reply to comment #15)
> What are the use-cases beyond the main page?  I haven't seen any mentioned. 
> Is
> anyone actually doing this already with CSS for non-main pages?

In multilingual sites the Main Page = Special:MyLanguage/Main_Page and these are many pages.
Comment 20 Quim Gil 2013-07-19 09:52:26 UTC
Going back to the original request:

(In reply to comment #0)
> Could a future MediaWiki have a configuration option to leave out the main
> page
> <h1>Main Page</h1> tag so that there's no need to 
> patch .js files for removing this tag -- this means each time MediWiki is
> updated, the patches have to be rolled in. It would be better if this 
> main page <h1> tag could be enabled or disabled per configuration setting.

This can be done easily via MediaWiki:Common.css, which will not be modified in upgrades.

On the other hand, it is a usual practice for any website not to call explicitly "Main Page", "Homepage", etc the main page. Just go out there and try to find such explicit mention in any decent website.

Therefore, I think the proper fix for this report would be to offer out of the box no heading for the article defined as Main Page. The heading would still be there, just hidden via CSS. This way webmaster interested in having it could enable it by simply rewriting the rule at MediaWiki:Common.css.

If you think this solution is wrong then let's resolve this as WONTFIX, pointing people with this problem to the right solution.
Comment 21 Bawolff (Brian Wolff) 2014-02-19 06:18:46 UTC
Given the amount of people who used {{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}} (before that was disabled), and the number of people who use css to disable the title on a specific page, I think having a __NOTITLE__ magic word is justified.

*I don't think telling users to modify the CSS is a good solution. User's shouldn't have to know CSS to do something this common.
**Additionally, I think non-admins should be able to hide the heading, for use-cases like the Asia example
*I personally think its good to have it as a general magic word, as often people disable the title so they can make some sort of fancier heading for the page. For example https://en.wikivoyage.org/wiki/Asia
*I do not think we should out of the box disable main page heading. This looks weird for people who just write out a non-fancy page there (That's just my opinion)
*I do not think this would be open to any more abuse then average heading since the title is still in the url/title bar. At worst someone could make a page that looks like at first glance its title is something else. They could probably already do that with some fancy position:absolute.

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


Navigation
Links