Forum:Probelmas to use DISPLAYTITLE

There's something called DISPLAYTITLE (do not know if it's template), which is used to change the title of an article, but not change the name completely. I would also like to use this template, because the title can be more customize. I don't know if it's CSS or JS. I'm use the MonoBook theme.

Thank you for your attention. 03:56, March 23, 2010 (UTC)


 * Add the following to your MediaWiki:Common.js then copy and paste the template from Uncyclopedia to your wiki. DISPLAYTITLE isn't set to do what you'd think it does, on Wikia, hence why people use this js hack to manipulate it. However, alternatively you can use Special:Contact and request staff to alter how they restrict displaytitle so that you can use that instead of the template. DISPLAYTITLE is definitely more preferred as it doesn't rely on javascript, so I'd recommend going that route and not the javascript hack.

/** Title rewrite ******************************************************** * Rewrites the page's title, used by Template:Title * By Sikon */ function rewriteTitle { if( typeof( SKIP_TITLE_REWRITE ) != 'undefined' && SKIP_TITLE_REWRITE ) return;
 * Javascript to add to MediaWiki&#58;Common.js if you wish to use the js hack instead of the better way

var titleDiv = document.getElementById('title-meta');

if( titleDiv == null || titleDiv == undefined ) return;

var cloneNode = titleDiv.cloneNode(true); var firstHeading = document.getElementById('firstHeading'); var node = firstHeading.childNodes[0];

// new, then old! firstHeading.replaceChild(cloneNode, node); cloneNode.style.display = 'inline'; if (titleDiv.childNodes[0].nodeValue.toLowerCase == wgPageName.replace(/_/g,' ').toLowerCase) document.title = titleDiv.childNodes[0].nodeValue;

var titleAlign = document.getElementById('title-align'); firstHeading.style.textAlign = titleAlign.childNodes[0].nodeValue; }

YAHOO.util.Event.onDOMReady( rewriteTitle );

--Joey (talk) 04:27, March 23, 2010 (UTC)
 * It did not work, help me!


 * http://pt.anti-hits.wikia.com/wiki/MediaWiki:Common.js
 * http://pt.anti-hits.wikia.com/wiki/Predefini%C3%A7%C3%A3o:Title 17:41, March 23, 2010 (UTC)