Link/Hash – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix #links) |
Lou Montana (talk | contribs) m (workaround # list) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{1|}}} | <includeonly>{{#if:{{{1|}}} | ||
|[[{{{1}}}{{!}}{{#ifeq:{{#pos:{{Trim|{{{1}}}}}|#}}|0 | |[[{{{1}}}{{!}}{{#ifeq:{{#pos:{{Trim|{{{1}}}}}|#}}|0 | ||
|{{#replace:{{#sub:{{Trim|{{{1}}}}}|1}}|_|<nowiki/> <nowiki/>}} | |{{#replace:{{#replace:{{#sub:{{Trim|{{{1}}}}}|1}}|_|<nowiki/> <nowiki/>}}|#|#}} | ||
|{{#replace:{{#explode:{{Trim|{{{1}}}}}|#|0|0|2}} - {{#explode:{{Trim|{{{1}}}}}|#|1|2}}|_|<nowiki/> <nowiki/>}} | |{{#replace:{{#explode:{{Trim|{{{1}}}}}|#|0|0|2}} - {{#explode:{{Trim|{{{1}}}}}|#|1|2}}|_|<nowiki/> <nowiki/>}} | ||
}}]] | }}]] | ||
Line 34: | Line 34: | ||
| <nowiki>.{{HashLink|Arma 3#Key features}}.</nowiki> | | <nowiki>.{{HashLink|Arma 3#Key features}}.</nowiki> | ||
| .{{HashLink|Arma 3#Key features}}. | | .{{HashLink|Arma 3#Key features}}. | ||
|- | |||
| <nowiki>{{HashLink|##if}}</nowiki> | |||
| {{HashLink|##if}} | |||
|- | |||
| <nowiki>{{HashLink|##if#then##else}}</nowiki> | |||
| {{HashLink|##if#then##else}} | |||
|- | |- | ||
| <nowiki>{{HashLink|PreProcessor Commands##if}}</nowiki> | | <nowiki>{{HashLink|PreProcessor Commands##if}}</nowiki> |
Revision as of 13:18, 16 August 2021
Creates an auto-formatted hash link (e.g #value or page#anchor).
Usage
{{HashLink|haskLink}}
- hashLink: wiki hash link, e.g #toc or Arma 3#Key features
Code | Result |
---|---|
{{HashLink}} | -no link specified- |
{{HashLink|#toc}} | toc |
{{HashLink|#Multipart Hashlink}} | Multipart Hashlink |
{{HashLink|Arma_3#Key_features}} | Arma 3 - Key features |
{{HashLink|Arma 3#Key features}} | Arma 3 - Key features |
.{{HashLink|Arma 3#Key features}}. | .Arma 3 - Key features. |
{{HashLink|##if}} | #if |
{{HashLink|##if#then##else}} | #if#then##else |
{{HashLink|PreProcessor Commands##if}} | PreProcessor Commands - #if |