Template:IfLinksTo

Determines if the page in parameter 1 contains a link to parameter 2. Parameter 3 is what it does if there is, parameter 4 is what it does if there isn't. Similar to Template:Linksto, but works more like a parser function in its own right.