How to get URL-encoded page title in MediaWiki PHP extension -


im developing mediawiki skin im beginner php, , 1 of element use article url-encoded title element id or class styles purpose. try example:this example not working.

assuming within execute function of skin, ca access title object this:

$title = $this->data['skin']->gettitle(); 

then can url enocoded title this:

$urlencodedtitle = $title->getpartialurl(); 


if in initpage function, use

$title = $this->gettitle(); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -