Manual:LinkRenderer.php

is a class to create HTML links for a specific title. It was refactored out of the Linker class in MediaWiki 1.28.

Getting a LinkRenderer instance
In general, the easiest way to get a  instance is from  : This will provide you with an instance prepared for the current user.

Some contexts will have their own LinkRenderer instance, like the Parser: If you need to set custom options, you can create your own! You shouldn't modify the main instances since that will affect the entire request state.

Making links
Okay, you now have a LinkRenderer instance. Let's make some links! At the very minimum you'll need a  or   target to link to. Will give you: If you want to change the link text: This text will automatically be escaped, (different from it's Linker predecessor). If you need to include HTML, you can armor the content: