Link/Internal – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "" to "") |
Lou Montana (talk | contribs) (Add namespace trim) |
||
Line 2: | Line 2: | ||
| | | | ||
{{#ifeq: {{#pos:{{Trim|{{{link}}}}}|#}}| | {{#ifeq: {{#pos:{{Trim|{{{link}}}}}|#}}| | ||
| [[{{{link}}}{{#if:{{{text|}}}|{{!}}{{{text}}}}}]] | | [[{{{link}}}{{#if:{{{text|}}}|{{!}}{{{text}}}|{{#ifeq: {{NAMESPACENUMBER}} | {{NAMESPACENUMBER:{{{link}}}}} | {{!}} {{PAGENAME:{{{link}}}}} <sub title="same namespace's page ({{NAMESPACE}})"><small>ns</small></sub> }}}}]] | ||
| {{Link/Hash|{{{link}}}|{{{text|}}}}} | | {{Link/Hash|{{{link}}}|{{{text|}}}}} | ||
}} | }} | ||
| -no link provided-{{TemplateCase||[[Category:Link template usage error]]}} | | -no link provided-{{TemplateCase||[[Category:Link template usage error]]}} | ||
}}</includeonly><noinclude>{{Doc/Template | }}</includeonly><noinclude>{{Doc/Template | ||
|descr= This template creates an internal link (within the BIKI). It uses {{Template|Link/Hash}}. | |descr= This template creates an internal link (within the BIKI). It uses {{Template|Link/Hash}}.<br> | ||
If ''text'' is not provided: | |||
* if ''link''<nowiki/>'s namespae is identical to the current page, only the page name is used as text | |||
* otherwise, the full namespace:pagename is used | |||
|param1= link | |param1= link | ||
|descr1= the internal link | |descr1= the internal link | ||
Line 28: | Line 31: | ||
|example8= <nowiki>{{Link/Internal|link= :Category:Scripting Commands|text= All Commands}}</nowiki> | |example8= <nowiki>{{Link/Internal|link= :Category:Scripting Commands|text= All Commands}}</nowiki> | ||
|result8= {{Link/Internal|link= :Category:Scripting Commands|text= All Commands}} | |result8= {{Link/Internal|link= :Category:Scripting Commands|text= All Commands}} | ||
|example9= <nowiki>* {{Link/Internal|link= Template:Link}}</nowiki><br><nowiki>* {{Link/Internal|link= DayZ:Diag Menu}}</nowiki> | |||
|result9= <nowiki/> | |||
* {{Link/Internal|link= Template:Link}} | |||
* {{Link/Internal|link= DayZ:Diag Menu}} | |||
}}</noinclude> | }}</noinclude> |
Revision as of 20:09, 1 December 2023
This template creates an internal link (within the BIKI). It uses {{Link/Hash}}.
If text is not provided:
- if link's namespae is identical to the current page, only the page name is used as text
- otherwise, the full namespace:pagename is used
This template is used on these pages.
Usage
{{Link/Internal|link|text}}
- link: the internal link
- text: (Optional) the text to display
Code | Result |
---|---|
{{Link/Internal}} | -no link provided- |
{{Link/Internal|link= setDir}} | setDir |
{{Link/Internal|text= setDir's page}} | -no link provided- |
{{Link/Internal|link= setDir|text= setDir's page}} | setDir's page |
{{Link/Internal|link= setDir#Example 1}} | setDir - Example 1 |
{{Link/Internal|link= Category:Scripting Commands}} | |
{{Link/Internal|link= :Category:Scripting Commands}} | Category:Scripting Commands |
{{Link/Internal|link= :Category:Scripting Commands|text= All Commands}} | All Commands |
* {{Link/Internal|link= Template:Link}} * {{Link/Internal|link= DayZ:Diag Menu}} |