Template:Linkappend: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{#if:{{{1|}}}|[[{{{pre|}}}{{#if:{{{lc|}}}|{{lc: {{{1|}}}}}|{{{1|}}}}}{{{post|}}}{{!}}{{{pred|}}}{{{1|}}}{{{postd|}}}]]|}}<noinclude> | {{#if:{{{1|}}}|[[{{{pre|}}}{{#if:{{{lc|}}}|{{lc: {{{1|}}}}}|{{{1|}}}}}{{{post|}}}{{!}}{{{pred|}}}{{#if:{{{uc|}}}|{{uc: {{{1|}}}}}|{{{1|}}}}}{{{postd|}}}]]|}}<noinclude> | ||
This template can be used to quickly and consistently create links which refer to various topics, in which the topics are to be listed as a simple phrase but all links are appended, prepended, or otherwise consistently modified. | |||
A good example is for a nav template such as [[Template:WaterOverlay result nav]], in which a listing of result types is given, structurally appended with the term "result type" and "(Water Overlay)", | |||
Examples: | |||
; <nowiki>{{linkappend|Result types|post=&nbsp;(Heat Overlay)}}</nowiki> | |||
: <nowiki>[[Result types (Heat Overlay)|Result types]]</nowiki> | |||
; <nowiki>{{linkappend|Attribute|pre=Select&nbsp;|post=&nbsp;(TQL)}}</nowiki> | |||
: <nowiki>[[Select Attribute (TQL)|Attribute]]</nowiki> | |||
; <nowiki>{{linkappend|Attribute|lc=true|pre=Select&nbsp;|post=&nbsp;(TQL)}}</nowiki> | |||
: <nowiki>[[select attribute (TQL)|Attribute]]</nowiki> | |||
Parameters: | |||
* 1 Text to show ánd the main text of the link | * 1 Text to show ánd the main text of the link | ||
* pre: text to prefix to the link url | * pre: text to prefix to the link url | ||
Line 6: | Line 22: | ||
* postd: text to postfix to the link text | * postd: text to postfix to the link text | ||
* lc: if present, lowercase the main text of link url itself (not the pre/postfixes, and not the displayed text) | * lc: if present, lowercase the main text of link url itself (not the pre/postfixes, and not the displayed text) | ||
* uc: if present, uppercase the main text of the displayed text (not the pre/postfixes, and not the main text of the link url) | |||
</noinclude> | </noinclude> |
Latest revision as of 07:03, 5 October 2023
This template can be used to quickly and consistently create links which refer to various topics, in which the topics are to be listed as a simple phrase but all links are appended, prepended, or otherwise consistently modified.
A good example is for a nav template such as Template:WaterOverlay result nav, in which a listing of result types is given, structurally appended with the term "result type" and "(Water Overlay)",
Examples:
- {{linkappend|Result types|post= (Heat Overlay)}}
- [[Result types (Heat Overlay)|Result types]]
- {{linkappend|Attribute|pre=Select |post= (TQL)}}
- [[Select Attribute (TQL)|Attribute]]
- {{linkappend|Attribute|lc=true|pre=Select |post= (TQL)}}
- [[select attribute (TQL)|Attribute]]
Parameters:
- 1 Text to show ánd the main text of the link
- pre: text to prefix to the link url
- post: text to postfix to the link url
- pred: text to prefix to the link text
- postd: text to postfix to the link text
- lc: if present, lowercase the main text of link url itself (not the pre/postfixes, and not the displayed text)
- uc: if present, uppercase the main text of the displayed text (not the pre/postfixes, and not the main text of the link url)