Help talk:Page name/Archives/2007

Latest comment: 17 years ago by Patrick in topic Two names for each page

How to remove a page title?

How can I remove/hide the title Main Page in my wiki http://www.wikiguitarist.com. Like in http://en.wikipedia.org/wiki/Main_Page, there is no Main Page title. How can this be achieved? thanks Alain

The title is removed using JavaScript to hide the appropriate container. There is a simple DOM-nonstandard version at s:MediaWiki:Common.js and a more complex DOM-standard version at w:MediaWiki:Common.js (search 'MainPage'). —{admin} Pathoschild 05:25, 13 January 2007 (UTC)
Thanks for the answer but his Common.js in my wiki? This file does not exist... is it an extension? Should I add it? Sorry but how I can use this? thanks Alain, 21 January 2007
Just add such a page on your wiki with exactly this name MediaWiki:Common.js and enable $wgUseSiteJs . See also Help:User style.--Patrick 10:55, 22 January 2007 (UTC)
Any help on what code to use exactly?
add the following code to the above page
function clearMainPage(){if (wgTitle == 'Main Page'){var h1tags= document.getElementsByTagName( "h1" );var h = h1tags[0];var parent = h.parentNode;parent.removeChild(h);}}addOnloadHook(clearMainPage);

Two names for each page

I have been transfering the content of a course website to wiki-study place. For my and the teacher's convenience it is best to name the pages after the url end tag, ie 5003_intro from "columbia.edu/.../5003_intro.html" but this shows up as the title of the page as well. How do I change the titles without changing the pagenames?

"Name" and "title" are synonyms. It seems like you want to give a page two names. I am inclined to say "Make up your mind, which one do you prefer?". However, you can make a conversion table to manually look up the alternative name back and forth, or create an array (or two, for both conversions), or use an attribute with the Semantic MediaWiki extension, or create redirects. It depends on what you want to do with each name, and whether you want to be able to convert manually or automatically, and in which direction(s).--Patrick 01:35, 14 February 2007 (UTC)
See also JavaScript code for having a top header different from what is the database title: w:MediaWiki:Common.js, "Technical restrictions title fix".--Patrick 01:53, 14 February 2007 (UTC)
There is also variable DISPLAYTITLE, but it does not seem to work well, see Help:Magic_words#Miscellany.--Patrick 09:53, 16 February 2007 (UTC)
Return to "Page name/Archives/2007" page.