In the FAQ, the methods indicated in How do I hide the main page title won't work with MediaWiki 1.22 per Manual:$wgRestrictDisplayTitle, "Additionally, some inline CSS rules like display: none; which can cause the text to be hidden or unselectable are disallowed." Is there another method? Peculiar Investor (talk) 18:15, 8 December 2013 (UTC)
Topic on Manual talk:FAQ
Try this instead of display: none;
:
<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">...</span>
It's the standard method of visually hiding text while leaving it readable by screen readers, etc...
Thank you for this hint. Works perfect! This is the "exended" version:
{{DISPLAYTITLE:<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">{{FULLPAGENAME}}</span>}}
Is there a specific reason to duplicate the clip: rect(1px 1px 1px 1px);
part of the CSS? I found it equally working in ommitting the second lot.
Support for IE5-7, older versions of IE used the non-standard version of clip+rect without the commas.
Great, thank you for the info and the interesting link. A feeling told me that it could be a compat thing. I added this information to the FAQ page. Cheers
Is there any way to remove the horizontal rule? I figure there must be, since wikipedia doesn't have it on their homepage, but I can't figure it out.
They hide it with the CSS method, which the manual falsely states no longer works.
W want to have a few landing pages that don't sow the Page Title so I have tried the CSS method to get rid of the horizontal rule, but no luck. I'm running MW 1.23.1 on a IIS web server.
I've included this as the first line in my content page: .
I've also include this in my LocalSettings.php file:
$wgRestrictDisplayTitle = false; $wgAllowDisplayTitle = true;
Anyone have any luck getting rid of the rule??? Thanks for any help!
Add this to Mediawiki:Common.js
body.page-Main_Page h1.firstHeading { display:none; }
I think you mean Mediawiki:Common.css :)