Link/Hash – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix description) |
Lou Montana (talk | contribs) m (Fix excessive spaces left and right) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{1|}}} | <includeonly>{{#if:{{{1|}}} | ||
|[[{{{1}}}{{!}} | |[[{{{1}}}{{!}}{{#ifeq:{{#pos:{{Trim|{{{1}}}}}|#}}|0 | ||
|{{#replace:{{#sub:{{Trim|{{{1}}}}}|1}}|_|<nowiki/> <nowiki/>}} | |{{#replace:{{#sub:{{Trim|{{{1}}}}}|1}}|_|<nowiki/> <nowiki/>}} | ||
|{{#replace:{{#explode:{{Trim|{{{1}}}}}|#|0|0}} - {{#explode:{{Trim|{{{1}}}}}|#|1}}|_|<nowiki/> <nowiki/>}} | |{{#replace:{{#explode:{{Trim|{{{1}}}}}|#|0|0}} - {{#explode:{{Trim|{{{1}}}}}|#|1}}|_|<nowiki/> <nowiki/>}} | ||
}} | }}]] | ||
|-no link specified- | |||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
Creates an auto-formatted hash link (e.g <tt>#value</tt> or <tt>page#anchor</tt>). | Creates an auto-formatted hash link (e.g <tt>#value</tt> or <tt>page#anchor</tt>). | ||
Line 33: | Line 31: | ||
| <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|Arma 3#Key features}}.</nowiki> | |||
| .{{HashLink|Arma 3#Key features}}. | |||
|} | |} | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Revision as of 03:09, 8 August 2020
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. |