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:PartialDelink: Difference between revisions

From Heroes Wiki
Jump to navigation Jump to search
imported>MiamiVolts
(fix subtraction)
imported>MiamiVolts
(fix template calls)
Line 1: Line 1:
<includeonly>{{{precede|}}}{{#if:{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}|{{#if:{{User:MiamiVolts/PartialLink/Linkend|{{{text}}}}}|<!-- before linktext
<noinclude>{{{precede|}}}{{#if:{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}|{{#if:{{User:MiamiVolts/PartialDelink/Linkend|{{{text}}}}}|<!-- before linktext
{{#sub:{{{text}}}|0|{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}}}--><!--delink call
{{#sub:{{{text}}}|0|{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}}}--><!--delink call
-->{{Delink|noprecede=1|linktext={{#sub:{{{text}}}|{{User:MiamiVolts/Linkstart|{{{text}}}}}|{{#expr:{{User:MiamiVolts/PartialDelink/Linkend|{{{text}}}}}-{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}+2<!--close expr-->}}<!--close sub-->}}<!--close delink-->}}<!--endstring-->|{{{text}}}}}|{{{text}}}}}</includeonly><noinclude>
-->{{Delink|noprecede=1|linktext={{#sub:{{{text}}}|{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}|{{#expr:{{User:MiamiVolts/PartialDelink/Linkend|{{{text}}}}}-{{User:MiamiVolts/PartialDelink/Linkstart|{{{text}}}}}+2<!--close expr-->}}<!--close sub-->}}<!--close delink-->}}<!--endstring-->|{{{text}}}}}|{{{text}}}}}</noinclude><noinclude>
== Usage ==
== Usage ==
<pre>{{PartialDelink
<pre>{{PartialDelink

Revision as of 19:51, 14 January 2008

{{{text}}}

Usage

{{PartialDelink
  |text=<string with link and optionally other text in it>
  |precede=<Optional character(s) to precede string by; default is the empty string>
}}

This template returns a string with the first substring (partial string), which is a link, replaced with the text inside the link.

Notes

  • This template calls the 'Delink' template, which can be used by itself if it is known that the link spans the entire input string.