This wiki is a XML full dump clone of "Heroes Wiki", the main wiki about the Heroes saga that has been shut down permanently since June 1, 2020. The purpose of this wiki is to keep online an exhaustive and accurate database about the franchise.

Template:Delink: Difference between revisions

From Heroes Wiki
Jump to navigation Jump to search
Content deleted Content added
imported>MiamiVolts
Document nolink option
imported>MiamiVolts
+Notes section
Line 6: Line 6:
|nolink=<Optional text to precede string if it didn't contain a link to begin with>
|nolink=<Optional text to precede string if it didn't contain a link to begin with>
}}</pre>
}}</pre>
This template returns the string inside a link, or the original string if not a link.<br />
This template returns the string inside a link, or the original string if not a link.
==Notes==
If the link destination is different from the shown text, only the shown text is returned.<br />
* If the link destination is different from the shown text, only the shown text is returned.
The nolink option is useful to combine with an external sub call to trim whitespace.
* The nolink option is useful to combine with an external sub call to trim whitespace.
* This template only delinks if the link occupies the entire string (beginning to end).
{{Nousercat|Page Elements}}
{{Nousercat|Page Elements}}
{{Nousercat|Link Templates}}
{{Nousercat|Link Templates}}

Revision as of 04:41, 7 January 2008


Usage

{{Delink
  |linktext=<string with link in it>
  |nolink=<Optional text to precede string if it didn't contain a link to begin with>
}}

This template returns the string inside a link, or the original string if not a link.

Notes

  • If the link destination is different from the shown text, only the shown text is returned.
  • The nolink option is useful to combine with an external sub call to trim whitespace.
  • This template only delinks if the link occupies the entire string (beginning to end).