Last modified: 2014-10-13 14:05:37 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.
It's not meant to be removed.
Hmm, mediawiki has it removed, and many other sites use various Javascript hacks to have it removed...
(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.
Yes, $wgShowMainPageTitle, is very good.
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.
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.
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".
No, we'd have <h1 class="maintitle"> or somesuch.
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)
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;
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.
(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.
(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.
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".
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 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.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
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.
(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.
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.
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.