Allow suppressing page title output
OpenPublic

Description

Author: sandvik

Description:
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.


Version: unspecified
Severity: normal

bzimport added projects: MediaWiki-Parser, Design.Via ConduitNov 21 2014, 9:17 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz6129.
bzimport created this task.Via LegacyMay 29 2006, 6:38 PM
brion added a comment.Via ConduitMay 29 2006, 8:21 PM

It's not meant to be removed.

bzimport added a comment.Via ConduitMay 29 2006, 9:22 PM

sandvik wrote:

Hmm, mediawiki has it removed, and many other sites use various Javascript hacks to have it removed...

bzimport added a comment.Via ConduitMay 30 2006, 11:12 AM

rotemliss wrote:

(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.

bzimport added a comment.Via ConduitMay 30 2006, 4:31 PM

sandvik wrote:

Yes, $wgShowMainPageTitle, is very good.

bzimport added a comment.Via ConduitJun 3 2006, 8:57 AM

rotemliss wrote:

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.

Attached: patch

bzimport added a comment.Via ConduitJul 4 2006, 8:09 AM

robchur wrote:

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.

bzimport added a comment.Via ConduitJul 4 2006, 8:17 AM

ayg wrote:

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".

bzimport added a comment.Via ConduitJul 4 2006, 9:37 AM

robchur wrote:

No, we'd have <h1 class="maintitle"> or somesuch.

hashar added a comment.Via ConduitMay 10 2007, 9:31 PM

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)

MZMcBride added a comment.Via ConduitAug 7 2010, 5:57 AM

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;

bzimport added a comment.Via ConduitAug 8 2010, 3:36 PM

ayg wrote:

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.

MZMcBride added a comment.Via ConduitAug 8 2010, 6:15 PM

(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.

bzimport added a comment.Via ConduitAug 8 2010, 7:00 PM

ayg wrote:

(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.

MZMcBride added a comment.Via ConduitAug 8 2010, 9:27 PM

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".

bzimport added a comment.Via ConduitAug 8 2010, 9:29 PM

ayg wrote:

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?

MZMcBride added a comment.Via ConduitAug 8 2010, 9:38 PM

(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.

Peachey88 added a comment.Via ConduitApr 30 2011, 12:09 AM

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

bzimport added a comment.Via ConduitNov 9 2011, 8:04 PM

sumanah wrote:

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.

Qgil added a comment.Via ConduitJul 18 2013, 8:48 AM

(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.

Qgil added a comment.Via ConduitJul 19 2013, 9:52 AM

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.

Bawolff added a comment.Via ConduitFeb 19 2014, 6:18 AM

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.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.