Шаблон:HashLink
Creates an auto-formatted hash link (e.g #value or page#anchor).
Usage
{{HashLink|hashLink|text}}
- hashLink: wiki hash link, e.g #toc or Arma 3#Key features
- text: display text
Code | Result | ||||||
---|---|---|---|---|---|---|---|
{{HashLink}} | {{#if: | [[{{{1}}}|{{#if: | {{{2}}} | {{{1}}}}}|#}}|0 | {{{1}}}}}|1}}|#|#}} | {{{1}}}}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:{{{1}}}|{{{1}}}}}|#|1|2}}
}}}}]] |
-no link specified-
}} |
{{HashLink|setDir}} | {{#if:setDir | {{#if: | {{{2}}} | setDir}}|#}}|0 | setDir}}|1}}|#|#}} | setDir}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:setDir|setDir}}|#|1|2}} }}}} | -no link specified-
}} |
{{HashLink|#toc}} | {{#if:#toc | {{#if: | {{{2}}} | #toc}}|#}}|0 | #toc}}|1}}|#|#}} | #toc}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:#toc|#toc}}|#|1|2}}
}}}} |
-no link specified-
}} |
{{HashLink|#Multipart Hashlink}} | {{#if:#Multipart Hashlink | {{#if: | {{{2}}} | #Multipart Hashlink}}|#}}|0 | #Multipart Hashlink}}|1}}|#|#}} | #Multipart Hashlink}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:#Multipart Hashlink|#Multipart Hashlink}}|#|1|2}}
}}}} |
-no link specified-
}} |
{{HashLink|#Multipart Hashlink|Display text}} | {{#if:#Multipart Hashlink | {{#if:Display text | Display text | #Multipart Hashlink}}|#}}|0 | #Multipart Hashlink}}|1}}|#|#}} | #Multipart Hashlink}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:#Multipart Hashlink|#Multipart Hashlink}}|#|1|2}}
}}}} |
-no link specified-
}} |
{{HashLink|Arma_3#Key_features}} | {{#if:Arma_3#Key_features | {{#if: | {{{2}}} | Arma_3#Key_features}}|#}}|0 | Arma_3#Key_features}}|1}}|#|#}} | Arma_3#Key_features}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:Arma_3#Key_features|Arma_3#Key_features}}|#|1|2}} }}}} | -no link specified-
}} |
{{HashLink|Arma 3#Key features}} | {{#if:Arma 3#Key features | {{#if: | {{{2}}} | Arma 3#Key features}}|#}}|0 | Arma 3#Key features}}|1}}|#|#}} | Arma 3#Key features}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:Arma 3#Key features|Arma 3#Key features}}|#|1|2}} }}}} | -no link specified-
}} |
{{HashLink|Arma 3#Key features|A3's Key Features}} | {{#if:Arma 3#Key features | {{#if:A3's Key Features | A3's Key Features | Arma 3#Key features}}|#}}|0 | Arma 3#Key features}}|1}}|#|#}} | Arma 3#Key features}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:Arma 3#Key features|Arma 3#Key features}}|#|1|2}} }}}} | -no link specified-
}} |
Edge Cases | |||||||
.{{HashLink|Arma 3#Key features}}. | .{{#if:Arma 3#Key features | {{#if: | {{{2}}} | Arma 3#Key features}}|#}}|0 | Arma 3#Key features}}|1}}|#|#}} | Arma 3#Key features}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:Arma 3#Key features|Arma 3#Key features}}|#|1|2}} }}}} | -no link specified-
}}. |
{{HashLink|##if}} | {{#if:##if | {{#if: | {{{2}}} | ##if}}|#}}|0 | ##if}}|1}}|#|#}} | ##if}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:##if|##if}}|#|1|2}}
}}}} |
-no link specified-
}} |
{{HashLink|##if#then##else}} | {{#if:##if#then##else | {{#if: | {{{2}}} | ##if#then##else}}|#}}|0 | ##if#then##else}}|1}}|#|#}} | ##if#then##else}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:##if#then##else|##if#then##else}}|#|1|2}}
}}}} |
-no link specified-
}} |
{{HashLink|PreProcessor Commands##if}} | {{#if:PreProcessor Commands##if | {{#if: | {{{2}}} | PreProcessor Commands##if}}|#}}|0 | PreProcessor Commands##if}}|1}}|#|#}} | PreProcessor Commands##if}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:PreProcessor Commands##if|PreProcessor Commands##if}}|#|1|2}} }}}} | -no link specified-
}} |
{{HashLink|CT_LISTNBOX#BIS_fnc_initList example}} | {{#if:CT_LISTNBOX#BIS_fnc_initList example | {{#if: | {{{2}}} | CT_LISTNBOX#BIS_fnc_initList example}}|#}}|0 | CT_LISTNBOX#BIS_fnc_initList example}}|1}}|#|#}} | CT_LISTNBOX#BIS_fnc_initList example}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:CT_LISTNBOX#BIS_fnc_initList example|CT_LISTNBOX#BIS_fnc_initList example}}|#|1|2}} }}}} | -no link specified-
}} |
{{HashLink|:Category:Community Tools#Code Edition}} | {{#if::Category:Community Tools#Code Edition | {{#if: | {{{2}}} | :Category:Community Tools#Code Edition}}|#}}|0 | :Category:Community Tools#Code Edition}}|1}}|#|#}} | :Category:Community Tools#Code Edition}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if::Category:Community Tools#Code Edition|:Category:Community Tools#Code Edition}}|#|1|2}} }}}} | -no link specified-
}} |
{{HashLink|Arma Reforger:Server Hosting#Dedicated Server}} | {{#if:Arma Reforger:Server Hosting#Dedicated Server | {{#if: | {{{2}}} | Arma Reforger:Server Hosting#Dedicated Server}}|#}}|0 | Arma Reforger:Server Hosting#Dedicated Server}}|1}}|#|#}} | Arma Reforger:Server Hosting#Dedicated Server}}|#|0|0|2}}|:Category:|}} - {{#explode:{{#if:Arma Reforger:Server Hosting#Dedicated Server|Arma Reforger:Server Hosting#Dedicated Server}}|#|1|2}} }}}} | -no link specified-
}} |