Template:Example link code/doc: Difference between revisions

Content deleted Content added
Creating documentation subpage for Template:Elc.
 
Now that the template exists, it can be used on its own documentation page.
Line 1:
{{documentation subpage}}
 
This formats an example [[Help:Link|wikilink]], to show how it would be entered in wiki markup. The first parameter is the link destination. E.g. {{tlc|elc|Cookie}} renders as <code>[<nowiki/>[{{elc|Cookie]]</code>}}, the wiki markup for the wikilink [[Cookie]]. If a second parameter is given, a [[WP:Piped link|piped link]] is shown. E.g. {{tlc|elc|Cookie|Biscuit}} renders as <code>[<nowiki/>[Cookie{{!elc|Cookie|Biscuit}}Biscuit]]</code>, the markup for the wikilink [[Cookie|Biscuit]].
 
A third parameter, if supplied, is included as a suffix to demonstrate [[Help:Wiki markup#Blend link|blended links]]; {{tlc|elc|Cookie||s}} produces <code>[<nowiki/>[{{elc|Cookie]]||s</code>}}, the wiki markup for [[Cookie]]s.
 
The short name {{tlc|elc}} ("example link, code") is chosen to be similar to the {{tlx|tlc}} template which produces similar output, but for template links.