Link – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (ExternalLink → Link/External) |
Lou Montana (talk | contribs) m (HashLink → Link/Hash) |
||
Line 4: | Line 4: | ||
| {{#ifeq:{{#pos:{{Trim|{{{link|{{{1|}}}}}}}}|#}}| | | {{#ifeq:{{#pos:{{Trim|{{{link|{{{1|}}}}}}}}|#}}| | ||
| [[{{{link|{{{1|}}}}}}{{#if:{{{text|{{{2|}}}}}}|{{!}}{{{link|{{{2}}}}}}}}]] | | [[{{{link|{{{1|}}}}}}{{#if:{{{text|{{{2|}}}}}}|{{!}}{{{link|{{{2}}}}}}}}]] | ||
| {{ | | {{Link/Hash|{{{link|{{{1}}}}}}|{{{text|{{{2|}}}}}}}} | ||
}} | }} | ||
}} | }} | ||
Line 10: | Line 10: | ||
}}</includeonly><noinclude>{{Doc/Template | }}</includeonly><noinclude>{{Doc/Template | ||
|descr= This template combines {{Template|Link/External}} and {{Template| | |descr= This template combines {{Template|Link/External}} and {{Template|Link/Hash}} under one entrypoint. | ||
It also adds the page to the [[:Category:Link template usage error|Link template usage error]] category on usage error. | It also adds the page to the [[:Category:Link template usage error|Link template usage error]] category on usage error. | ||
Line 23: | Line 23: | ||
|example3= <nowiki>{{Link|link= http://ofp.gamepark.cz/index.php?showthis=2302}}</nowiki> | |example3= <nowiki>{{Link|link= http://ofp.gamepark.cz/index.php?showthis=2302}}</nowiki> | ||
|result3= {{Link|link= http://ofp.gamepark.cz/index.php?showthis=2302}} | |result3= {{Link|link= http://ofp.gamepark.cz/index.php?showthis=2302}} | ||
|example4= <nowiki>{{Link|setDir}}</nowiki> | |example4= <nowiki/> | ||
<nowiki>{{Link|setDir}}</nowiki><br> | |||
<nowiki>{{Link|setDir#notes}}</nowiki><br> | |||
| | <nowiki>{{Link|setDir#notes|setDir and nothing else}}</nowiki> | ||
|result4= {{Link|setDir}}<br>{{Link|setDir#notes}}<br>{{Link|setDir#notes|setDir and nothing else}} | |||
|example5= <nowiki/> | |||
<nowiki>{{Link|#}}</nowiki><br> | |||
| | <nowiki>{{Link|#Usage}}</nowiki><br> | ||
| | <nowiki>{{Link|#Usage|The Usage chapter}}</nowiki> | ||
|result5= {{Link|#}}<br>{{Link|#Usage}}<br>{{Link|#Usage|The Usage chapter}} | |||
|example6= <nowiki/> | |||
<nowiki>{{Link|Arma Reforger:Getting Started}}</nowiki><br> | |||
| | <nowiki>{{Link|Arma Reforger:Getting Started|Test}}</nowiki><br> | ||
<nowiki>{{Link|Arma Reforger:Getting Started#Play in Single Player}}</nowiki><br> | |||
<nowiki>{{Link|Arma Reforger:Getting Started#Play in Single Player|Play in Single Player}}</nowiki> | |||
|result6= {{Link|Arma Reforger:Getting Started}}<br>{{Link|Arma Reforger:Getting Started|Test}}<br>{{Link|Arma Reforger:Getting Started#Play in Single Player}}<br>{{Link|Arma Reforger:Getting Started#Play in Single Player|Play in Single Player}} | |||
}}</noinclude> | }}</noinclude> |
Revision as of 16:52, 4 January 2023
This template combines {{Link/External}} and {{Link/Hash}} under one entrypoint. It also adds the page to the Link template usage error category on usage error.
This template is used on these pages.
Usage
{{Link|link|text}}
- link: (possibly named parameter) the URL or the local link, hashed or not (Operation Flashpoint#Introduction)
- text: (Optional, possibly named parameter) text to be displayed
Code | Result |
---|---|
{{Link}} | -no link provided- |
{{Link|http://}} | http:// |
{{Link|link= http://ofp.gamepark.cz/index.php?showthis=2302}} | ofpr.info link link courtesy of OFP-Faguss.com |
{{Link|setDir}} |
setDir setDir - notes setDir and nothing else |
{{Link|#}} |
[[#|]] Usage The Usage chapter |
{{Link|Arma Reforger:Getting Started}} |
Arma Reforger:Getting Started Test Arma Reforger:Getting Started - Play in Single Player Play in Single Player |