Link/Hash – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Templates" to "{{uc:{{PAGENAME}}}}")
m (Fix #links)
Line 2: Line 2:
|[[{{{1}}}{{!}}{{#ifeq:{{#pos:{{Trim|{{{1}}}}}|#}}|0
|[[{{{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|2}} - {{#explode:{{Trim|{{{1}}}}}|#|1|2}}|_|<nowiki/> <nowiki/>}}
}}]]
}}]]
|-no link specified-
|-no link specified-
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|PreProcessor Commands##if}}</nowiki>
| {{HashLink|PreProcessor Commands##if}}
|}
|}


[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Revision as of 13:03, 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
Examples
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|PreProcessor Commands##if}} PreProcessor Commands - #if