Template:Optional link/doc

Usage
Outputs the text parameter. If a url parameter is given, then create a hyperlink to the url, with the text as the clickable link.

This template is primarily intended for use by other templates. It makes it much easier to add an optional url parameter.