Template:Title/doc

This template automatically replaces the title of a page with a custom one, and allows align changes.

Usage examples:
 * removes namespace
 * ''custom title
 * centered
 * aligned to the right
 * etc

This template requires you to add the following to your MediaWiki:Common.js:

/* Script that allows pagetitle changes and pagetitle custom alignment Requires copying Template:Title. */ // ===================================================================== // Pagetitle rewrite // // Rewrites the page's title, used by Template:Title // by Sikon // // The script was found incompatable when imported as other scripts are // ===================================================================== function rewriteTitle { if(typeof(SKIP_TITLE_REWRITE) != 'undefined' && SKIP_TITLE_REWRITE) return; var titleDiv = document.getElementById('title-meta'); if(titleDiv == null || titleDiv == undefined) return; // For the title in the Monaco masthead if (skin == "monaco" && (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk")) { var mastheadUser = document.getElementById("user_masthead_head"); var mastheadSince = document.getElementById("user_masthead_since"); var titleString = ' ' + titleDiv.innerHTML; titleString += '' + mastheadSince.innerHTML; titleString += ' '; mastheadUser.innerHTML = titleString; } else { var cloneNode = titleDiv.cloneNode(true); var firstHeading = $('h1.firstHeading').get(0); var node = firstHeading.childNodes[0]; // new, then old! firstHeading.replaceChild(cloneNode, node); cloneNode.style.display = "inline"; var titleAlign = document.getElementById('title-align'); firstHeading.style.textAlign = titleAlign.childNodes[0].nodeValue; } } addOnloadHook(rewriteTitle, false);

/* End of the JavaScript title rewrite/alignment */